diff --git a/gnuhealth/install.sh b/gnuhealth/install.sh index bfe6392..1988397 100755 --- a/gnuhealth/install.sh +++ b/gnuhealth/install.sh @@ -22,9 +22,7 @@ lxc-execute gnuhealth -- sh -c 'TRYTONPASSFILE=/tmp/.adminpwd trytond-admin -d g rm -f /var/lib/lxc/gnuhealth/gnuhealth/tmp/.adminpwd # Populate demo database -wget http://health.gnu.org/downloads/postgres_dumps/gnuhealth-32-demo.sql.gz -O /tmp/gnuhealth_demo.sql.gz -zcat /tmp/gnuhealth_demo.sql.gz | lxc-attach -u 5432 -g 5432 postgres -- sh -c "PGPASSWORD=${GNUHEALTH_PWD} psql gnuhealth_demo gnuhealth" -rm -f /tmp/gnuhealth_demo.sql.gz +zcat /var/lib/lxc/gnuhealth/gnuhealth/srv/gnuhealth/gnuhealth_demo.sql.gz | lxc-attach -u 5432 -g 5432 postgres -- sh -c "PGPASSWORD=${GNUHEALTH_PWD} psql gnuhealth_demo gnuhealth" # Install service cp etc/init.d/gnuhealth /etc/init.d/gnuhealth diff --git a/gnuhealth/lxcfile b/gnuhealth/lxcfile index f584ea0..4b4b2f8 100644 --- a/gnuhealth/lxcfile +++ b/gnuhealth/lxcfile @@ -41,6 +41,9 @@ RUN EOF sudo -u gnuhealth npm install --production sudo -u gnuhealth ./node_modules/.bin/grunt + # Download Demo database + wget http://health.gnu.org/downloads/postgres_dumps/gnuhealth-32-demo.sql.gz -O /srv/gnuhealth/gnuhealth_demo.sql.gz + # Cleanup apk --no-cache del .deps find /srv/gnuhealth -name '.git*' -exec rm -rf {} +