Update pups repo to correct .git URL (#393)
[discourse_docker.git] / templates / postgres.template.yml
index 50c8f01affc5dbe36b1b68a4efe9d6e9e5adad32..a970dcc7f575fa1d8d4d47f9f443793d61b3553e 100644 (file)
@@ -19,6 +19,7 @@ hooks:
        to: sv start postgres || exit 1
 
 run:
+  - exec: locale-gen $LANG && update-locale
   - exec: mkdir -p /shared/postgres_run
   - exec: chown postgres:postgres /shared/postgres_run
   - exec: chmod 775 /shared/postgres_run
@@ -65,8 +66,10 @@ run:
          required=$(($(du -s /shared/postgres_data | awk '{print $1}') * 2))
 
          if [ "$free_disk" -lt "$required" ]; then
-          echo "WARNING: Upgrading PostgresSQL would require an addtional $(du -sh /shared/postgres_data | awk '{print $1}') of disk space"
+          echo "WARNING: Upgrading PostgresSQL would require an addtional $(numfmt --to=si $(($required - $free_disk))) of disk space"
           echo "Please free up some space, or expand your disk, before continuing."
+          echo ''
+          echo 'To avoid upgrading change "templates/postgres.template.yml" TO "templates/postgres.9.5.template.yml" in containers/app.yml'
           exit 1
          fi