From d40cbe661620be6cdc71f10d94166809dc4af36b Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 20 Feb 2018 20:50:42 +0100 Subject: [PATCH] Modify Pandora script to allow to build vanilla instance --- pandora.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora.sh b/pandora.sh index bb47b61..a9ed3b3 100755 --- a/pandora.sh +++ b/pandora.sh @@ -23,7 +23,13 @@ docker exec rabbitmq rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" " # Configure Pandora mkdir -p /srv/pandora/conf /srv/pandora/data chown 8002:8002 /srv/pandora/data -cp ${SOURCE_DIR}/srv/pandora/conf/config.jsonc /srv/pandora/conf/config.jsonc +# Copy customized configuration if VANILLA environment variable is not set, else use the default pandora config +if [ ${VANILLA:-0} -eq 0 ]; then + cp ${SOURCE_DIR}/srv/pandora/conf/config.jsonc /srv/pandora/conf/config.jsonc +else + chown 8002:8002 /srv/pandora/conf + docker run --rm -v /srv/pandora/conf:/srv/pandora/conf pandora cp /srv/pandora/pandora/config.pandora.jsonc /srv/pandora/conf/config.jsonc +fi cp ${SOURCE_DIR}/srv/pandora/conf/gunicorn_config.py /srv/pandora/conf/gunicorn_config.py envsubst <${SOURCE_DIR}/srv/pandora/conf/local_settings.py >/srv/pandora/conf/local_settings.py