scripts: 'compose' and some minor fixes

This commit is contained in:
chandi
2020-06-06 14:39:31 +02:00
parent 7148ae733c
commit 55d35d20ca
5 changed files with 32 additions and 16 deletions

22
scripts/compose Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -e
cd $(dirname $0)/..
# load .env
if [ -f .env ]
then
# exclude WELCOME_FOOTER because it may contain invalid characters
export $(cat .env | sed 's/#.*//g' | grep -v "WELCOME_FOOTER" | xargs)
fi
# concatenate docker-compose file
COMPOSE_FILES="-f docker-compose.yml"
if [ "$ENABLE_HTTPS_PROXY" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.https.yml"
fi
if [ "$ENABLE_GREENLIGHT" == true ]; then
COMPOSE_FILES="$COMPOSE_FILES -f docker-compose.greenlight.yml"
fi
docker-compose $COMPOSE_FILES $@