Make auto_build do less, and keep it simple
[discourse_docker.git] / templates / postgres.template.yml
index 9eaaa4ad35a0ddc9415377a2bcc99f37a46ddcd1..1f30fcf35797353bc17e1d39ccb9f92dad4d92f5 100644 (file)
@@ -77,13 +77,12 @@ run:
 
            if [ "$PG_MAJOR_OLD" = "9.2" ]; then
              echo Add the line: 'base_image: "samsaffron/discourse:0.1.1"'
-             echo Change: "templates/postgres.template.yml TO templates/postgres.9.2.template.yml"
+             echo 'In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.2.template.yml"'
              echo
            fi
 
            if [ "$PG_MAJOR_OLD" = "9.3" ]; then
-             echo Add the line: 'base_image: "discourse/discourse:1.0.17"'
-             echo Change: "templates/postgres.template.yml TO templates/postgres.9.3.template.yml"
+             echo 'In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml"'
              echo
            fi
 
@@ -93,9 +92,14 @@ run:
            echo Run "./launcher enter app"
            echo Run "cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db"
            echo
-           echo Undo the base_image and postgres template from your container config
+           if [ "$PG_MAJOR_OLD" = "9.2" ]; then
+             echo Undo the base_image in your container config
+           fi
+           if [ "$PG_MAJOR_OLD" = "9.3" ]; then
+             echo Undo the postgres template in your container config
+           fi
            echo Run: "./launcher stop app"
-           echo Run: "sudo mv /var/discourse/shared/postgres_data /var/shared/postgres_data_old"
+           echo Run: "sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old"
            echo Run: "./launcher rebuild app"
            echo
            echo Run: "./launcher enter app"
@@ -117,9 +121,12 @@ run:
          echo
          echo Old ${PG_MAJOR_OLD} database is stored at /shared/postgres_data_old
          echo
-         echo Please run "./launcher bootstrap" again
+         echo To complete the upgrade, rebuild again using:
+         echo
+         echo     ./launcher rebuild app
          echo -------------------------------------------------------------------------------------
-         exit 1
+         # Magic exit status to denote no failure
+         exit 77
        fi
   - exec:
       cmd: