Distribute GNU Health demo database along with image
This commit is contained in:
parent
49dffce0d0
commit
43922d8192
@ -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
|
||||
|
@ -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 {} +
|
||||
|
Loading…
Reference in New Issue
Block a user