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