Commit b45c1aa4 authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

entrypoint: make optional

parent 7bcfa833
......@@ -25,7 +25,6 @@ services:
KOHA_ADMINPASS: "${KOHA_ADMINPASS:-secret}"
KOHA_ADMINUSER: "${KOHA_ADMINUSER:-admin}"
KOHA_INSTANCE: "${KOHA_INSTANCE:-name}"
KOHA_DBHOST: koha_mysql
INSTALL_LANGUAGES: "${INSTALL_LANGUAGES}"
DEFAULT_LANGUAGE: "${DEFAULT_LANGUAGE}"
EMAIL_ENABLED: "True"
......
......@@ -14,10 +14,10 @@ echo "Setting up supervisord ..."
envsubst < /templates/global/supervisord.conf.tmpl > /etc/supervisor/conf.d/supervisord.conf
echo "Mysql server setup ..."
if ping -c 1 -W 1 $KOHA_DBHOST ; then
if [ -z $KOHA_DBHOST && ping -c 1 -W 1 $KOHA_DBHOST ] ; then
printf "Using linked mysql container $KOHA_DBHOST\n"
else
printf "Unable to connect to linked mysql container $KOHA_DBHOST\n-- initializing local mysql ...\n"
printf "No linked mysql or unable to connect to linked mysql $KOHA_DBHOST\n-- initializing local mysql ...\n"
/etc/init.d/mysql start
sleep 1 # waiting for mysql to spin up on slow computers
echo "127.0.0.1 $KOHA_DBHOST" >> /etc/hosts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment