Create persistent storage for Sahana demo default template

This commit is contained in:
Disassembler 2018-02-10 12:53:47 +01:00
parent b214b872be
commit 3bd1dd3e43
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i postgres psql
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
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
# Configure Sahana # Configure Sahana
export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64) export SAHANADEMO_HMAC=$(head -c 18 /dev/urandom | base64)

View File

@ -19,6 +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/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