BotZ/entrypoint.sh
Blallo fae15e5737
Change entrypoint of dockerfile.
Use environment variables for base_uri and config file.
2019-09-04 15:05:21 +02:00

35 lines
599 B
Bash
Executable File

#!/bin/bash
CONF="/tmp/botz.yaml"
if [ -z ${DEBUG} ]; then
_DEBUG="false"
else
_DEBUG="true"
fi
if [ -z ${BASE_URI} ]; then
echo "Missing BASE_URI environment variable."
exit 1
fi
cat > ${CONF} <<-EOF
base_uri: ${BASE_URI}
debug: ${_DEBUG}
log:
level: ${DEBUG_LEVEL:-INFO}
syslog: false
http:
bind_addr:
- "0.0.0.0"
port: 3003
EOF
echo "--------------------------------------------"
echo " STARTING WITH CONFIG:"
echo "--------------------------------------------"
cat ${CONF}
echo "--------------------------------------------"
z_app -c ${CONF}