diff deploy/provision.d/080-database-load.sh @ 1589:94669513c53c dockerise

Docs etc
author Chris Cannam
date Thu, 17 Aug 2017 13:56:15 +0100
parents d8949733849d
children 5486a5848ad8
line wrap: on
line diff
--- a/deploy/provision.d/080-database-load.sh	Thu Aug 17 12:06:04 2017 +0100
+++ b/deploy/provision.d/080-database-load.sh	Thu Aug 17 13:56:15 2017 +0100
@@ -2,6 +2,11 @@
 
 set -e
 
+# Start the database and if a dump file is found, load it. The dump
+# file is then deleted so that the db won't be overwritten on
+# subsequent runs. (The original repo contains no dump file, so it
+# should exist only if you have provided some data to load.)
+
 /etc/init.d/postgresql start
 
 cd /var/www/code
@@ -9,8 +14,6 @@
 if [ -f postgres-dumpall ]; then
     chmod ugo+r postgres-dumpall
     sudo -u postgres psql -f postgres-dumpall postgres
-    rm postgres-dumpall # This was just a copy of the shared folder file anyway
+    rm postgres-dumpall
 fi
 
-
-