# HG changeset patch # User Goffi # Date 1455887656 -3600 # Node ID 09099ce530da570ca4914f3007eaca0a8ce46870 # Parent f7d275afc4f27bfa290b65705cbf61db0b646121 docker (libervia_cont): domain can now be specified with "SAT_CONT_DOMAIN" env variable in addition to command line argument + use https for help site (wiki) diff -r f7d275afc4f2 -r 09099ce530da docker/libervia_cont.sh --- a/docker/libervia_cont.sh Fri Feb 19 13:35:25 2016 +0100 +++ b/docker/libervia_cont.sh Fri Feb 19 14:14:16 2016 +0100 @@ -21,6 +21,7 @@ # environment variables that can be used for configuration: # SAT_CONT_TLS_DIR for TLS certificates directory +# SAT_CONT_DOMAIN for the host name CONTAINERS="prosody sat_pubsub salut sat libervia" @@ -50,7 +51,7 @@ USAGE="Usage: $0 [start|stop|restart|update|backup|restore|ports|config] [ARGS...]" -HELP_SITE="http://wiki.goffi.org/wiki/Docker/en" +HELP_SITE="https://wiki.goffi.org/wiki/Docker/en" HELP_MUC="sat@chat.jabberfr.org" CONT_CERT_DIR="/usr/share/sat/certificates" @@ -163,7 +164,7 @@ printf "no domain given, --domain must be followed by a domain\n" exit 1 fi - DOMAIN=$1 + SAT_CONT_DOMAIN="$1" shift ;; @@ -207,7 +208,8 @@ download_missing || exit 1 printf "Running data container... " - docker_id=$(docker run -d -ti --name $VOLUME_ALIAS $VOLUME_CONT 2>&1) + # we use -d even if data container doesn't stay in background to get id of the container + docker_id=$(docker run -d --name $VOLUME_ALIAS $VOLUME_CONT 2>&1) if [ $? -eq 0 ]; then printf "OK ($docker_id)\n" else @@ -228,8 +230,8 @@ for CONT in $CONTAINERS; do case $CONT in prosody) OPTS="$DK_DETACH $DK_TERM $DK_VOLUME $DK_TLS $(public_ports_arg $CONT) --name prosody" - if [ -n "$DOMAIN" ]; then - OPTS="-e DOMAIN=$DOMAIN $OPTS" + if [ -n "$SAT_CONT_DOMAIN" ]; then + OPTS="-e DOMAIN=$SAT_CONT_DOMAIN $OPTS" fi ;; sat_pubsub) OPTS="$DK_DETACH $DK_TERM $DK_VOLUME --name sat_pubsub --link=prosody:prosody";;