Modify Pandora script to allow to build vanilla instance

This commit is contained in:
Disassembler 2018-02-20 20:50:42 +01:00
parent b41839e3c0
commit d40cbe6616
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499

View File

@ -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