Fix Sahana Demo mount paths

This commit is contained in:
Disassembler 2018-02-10 13:20:18 +01:00
parent 2b7f42d0db
commit 10f2353a85
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
2 changed files with 4 additions and 4 deletions

View File

@ -12,10 +12,10 @@ export SAHANADEMO_PWD=$(head -c 18 /dev/urandom | base64)
envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql
# Prepare persistent directory structure # 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 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/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 # Configure Sahana
export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64) 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 envsubst <${SOURCE_DIR}/masterUsers.csv >/tmp/masterUsers.csv
# Populate database # 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 rm /tmp/masterUsers.csv
# Create Sahana service # Create Sahana service

View File

@ -19,7 +19,7 @@ start() {
--link postgres \ --link postgres \
-p 127.0.0.1:8098:8001 \ -p 127.0.0.1:8098:8001 \
-v /srv/sahana-demo/conf:/srv/web2py/applications/eden/models \ -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/databases:/srv/web2py/applications/eden/databases \
-v /srv/sahana-demo/data/uploads:/srv/web2py/applications/eden/uploads \ -v /srv/sahana-demo/data/uploads:/srv/web2py/applications/eden/uploads \
sahana sahana