Adding 30-config

Adding needed files for docker image
This commit is contained in:
mohammedalqadi 2020-05-11 06:00:46 +03:00 committed by GitHub
parent 486f148e19
commit ff049cf2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,21 @@
#!/usr/bin/with-contenv bash
# Env variable validation
VARS=( \
TZ
WEB_PORT
)
for i in "${VARS[@]}"; do
if [ -z ${!i+x} ]; then
echo "[cont-init.d] ${i} is required and is not set will not continue"
exit 0
fi
done
export APP_ROOT=/app
export STATIC_FOLDER=/app/static
# permissions
chown -R abc:abc \
/app