From 10f2353a856b278c1a2389b42bc3c460dd251db8 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sat, 10 Feb 2018 13:20:18 +0100 Subject: [PATCH] Fix Sahana Demo mount paths --- sahana-demo.sh | 6 +++--- sahana-demo/etc/init.d/sahana-demo | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sahana-demo.sh b/sahana-demo.sh index 6e22e41..fb0433b 100755 --- a/sahana-demo.sh +++ b/sahana-demo.sh @@ -12,10 +12,10 @@ export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64) envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql # Prepare persistent directory structure -mkdir -p /srv/sahana-demo/conf /srv/sahana-demo/data/databases /srv/sahana-demo/data/uploads +mkdir -p /srv/sahana-demo/conf /srv/sahana-demo/data/databases /srv/sahana-demo/data/uploads /srv/sahana-demo/data/default chown -R 8001:8001 /srv/sahana-demo/conf /srv/sahana-demo/data docker run --rm -v /srv/sahana-demo/conf:/mnt/conf sahana cp -rp /srv/web2py/applications/eden/models/. /mnt/conf -docker run --rm -v /srv/sambro/data/default:/mnt/data sahana cp -rp /srv/web2py/applications/eden/modules/templates/default/. /mnt/data +docker run --rm -v /srv/sahana-demo/data/default:/mnt/data sahana cp -rp /srv/web2py/applications/eden/modules/templates/default/. /mnt/data # Configure Sahana export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64) @@ -26,7 +26,7 @@ export SAHANADEMO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) envsubst <${SOURCE_DIR}/masterUsers.csv >/tmp/masterUsers.csv # Populate database -docker run --rm -h sahana-demo --link postgres -v /srv/sahana-demo/conf:/srv/web2py/applications/eden/models -v /srv/sahana-demo/data/Spotter:/srv/web2py/applications/eden/modules/templates/Spotter -v /srv/sahana-demo/data/databases:/srv/web2py/applications/eden/databases -v /tmp/masterUsers.csv:/srv/web2py/applications/eden/modules/templates/default/users/masterUsers.csv sahana ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py +docker run --rm -h sahana-demo --link postgres -v /srv/sahana-demo/conf:/srv/web2py/applications/eden/models -v /srv/sahana-demo/data/databases:/srv/web2py/applications/eden/databases -v /tmp/masterUsers.csv:/srv/web2py/applications/eden/modules/templates/default/users/masterUsers.csv sahana ./web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py rm /tmp/masterUsers.csv # Create Sahana service diff --git a/sahana-demo/etc/init.d/sahana-demo b/sahana-demo/etc/init.d/sahana-demo index e79d24b..863c4bc 100755 --- a/sahana-demo/etc/init.d/sahana-demo +++ b/sahana-demo/etc/init.d/sahana-demo @@ -19,7 +19,7 @@ start() { --link postgres \ -p 127.0.0.1:8098:8001 \ -v /srv/sahana-demo/conf:/srv/web2py/applications/eden/models \ - -v /srv/sambro/data/default:/srv/web2py/applications/eden/modules/templates/default \ + -v /srv/sahana-demo/data/default:/srv/web2py/applications/eden/modules/templates/default \ -v /srv/sahana-demo/data/databases:/srv/web2py/applications/eden/databases \ -v /srv/sahana-demo/data/uploads:/srv/web2py/applications/eden/uploads \ sahana