Here’s where I got the discourse setup script
https://github.com/discourse/discourse_docker.git /var/discourse
and it runs good when creating a new discourse instance.
But problem comes when I tried to rebuild app with my old discourse data.
Here’s part of the log:
**syncing data to disk ... ok**
**Success. You can now start the database server using:**
** pg_ctlcluster 10 main start**
**Warning: The selected stats_temp_directory /var/run/postgresql/10-main.pg_stat_tmp**
**postgresql.conf.**
**is not writable for the cluster owner. Not adding this setting in**
**Ver Cluster Port Status Owner Data directory Log file**
**10 main 5433 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log**
**update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/12/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken**
**invoke-rc.d: could not determine current runlevel**
**invoke-rc.d: policy-rc.d denied execution of start.**
**Processing triggers for postgresql-common (215.pgdg100+1) ...**
**Building PostgreSQL dictionaries from installed myspell/hunspell packages...**
**Removing obsolete dictionary files:**
**Stopping PostgreSQL 10 database server: main.**
**Stopping PostgreSQL 12 database server: main.**
**Performing Consistency Checks**
**-----------------------------**
**Checking cluster versions ok**
**The source cluster was not shut down cleanly.**
**Failure, exiting**
**-------------------------------------------------------------------------------------**
**UPGRADE OF POSTGRES FAILED**
**Please visit https://meta.discourse.org/t/postgresql-12-update/151236 for support**
**You can run ./launcher start app to restart your app in the meanwhile**
**FAILED**
**--------------------**
**Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 47 exit 1>**
**Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'**
**exec failed with the params "/root/upgrade_postgres"**
**43aeccc15b54cbb03c8d665c755aa666012088aaeb8bbd7437faf68d70c28634**
**** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.**
**./discourse-doctor may help diagnose the problem.**