After rebuild, site won't load

Because my Discourse gave me notice to git pull and rebuild the app to get the most recent updates, I’ve been attempting to do so, but rebuilding seems to take my site offline. I’m not sure why, because I don’t see any obvious problems in the rebuilding process. Here’s what I see when I rebuild… Any thoughts about what might be going wrong?

me@me:~# cd /var/discourse
me@me:/var/discourse# git pull
remote: Counting objects: 226, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 226 (delta 98), reused 102 (delta 98), pack-reused 121
Receiving objects: 100% (226/226), 47.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (155/155), completed with 35 local objects.
From https://github.com/discourse/discourse_docker
   350cc62..9291792  master     -> origin/master
Updating 350cc62..9291792
Fast-forward
 .gitignore                                   |   1 +
 README.md                                    |  16 +++++++++++--
 Vagrantfile                                  |  15 +++++++-----
 discourse-setup                              | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------
 image/auto_build.rb                          |   5 ++--
 image/base/.gitignore                        |   1 -
 image/base/Dockerfile                        |  16 ++++---------
 image/base/download_phantomjs                |   3 ---
 image/base/install-nginx                     |   2 +-
 image/base/rb_thread_fd_close.patch          |  15 ------------
 image/base/runit-1.d-00-fix-var-logs         |   2 ++
 image/build.rb                               |   1 -
 image/discourse_bench/Dockerfile             |   2 +-
 image/discourse_dev/Dockerfile               |  11 ++++++++-
 image/discourse_fast_switch/Dockerfile       |   2 +-
 image/discourse_fast_switch/create_switch.rb |   2 +-
 image/discourse_test/Dockerfile              |  12 ++++++++--
 image/monitor/Dockerfile                     |   2 +-
 launcher                                     |  40 ++++++++++++++++---------------
 samples/data.yml                             |  10 +++-----
 samples/web_only.yml                         |  61 +++++++++++++++++++++++++++-------------------
 templates/import/mbox.template.yml           |  48 +++++++++++++++++++++++++++++++++++++
 templates/postgres.10.template.yml           | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 templates/postgres.template.yml              |   8 ++++++-
 templates/redis.template.yml                 |   8 ++++++-
 templates/web.letsencrypt.ssl.template.yml   |   2 +-
 templates/web.ssl.template.yml               |   2 +-
 templates/web.template.yml                   |  22 +++++++++++++----
 28 files changed, 504 insertions(+), 179 deletions(-)
 delete mode 100644 image/base/.gitignore
 delete mode 100755 image/base/download_phantomjs
 delete mode 100644 image/base/rb_thread_fd_close.patch
 create mode 100644 templates/import/mbox.template.yml
 create mode 100644 templates/postgres.10.template.yml
me@me:/var/discourse# ./launcher rebuild app
WARNING: Docker version 17.05.0-ce deprecated, recommend upgrade to 17.06.2 or newer.

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

Unable to find image 'discourse/base:2.0.20171231' locally
2.0.20171231: Pulling from discourse/base
50aff78429b1: Pulling fs layer
f6d82e297bce: Pulling fs layer
275abb2c8a6f: Pulling fs layer
9f15a39356d6: Pulling fs layer
fc0342a94c89: Pulling fs layer
35787b1294ac: Pulling fs layer
9f15a39356d6: Waiting
fc0342a94c89: Waiting
35787b1294ac: Waiting
275abb2c8a6f: Verifying Checksum
275abb2c8a6f: Download complete
f6d82e297bce: Verifying Checksum
f6d82e297bce: Download complete
fc0342a94c89: Verifying Checksum
fc0342a94c89: Download complete
9f15a39356d6: Verifying Checksum
9f15a39356d6: Download complete
50aff78429b1: Verifying Checksum
50aff78429b1: Download complete
50aff78429b1: Pull complete
f6d82e297bce: Pull complete
275abb2c8a6f: Pull complete
9f15a39356d6: Pull complete
fc0342a94c89: Pull complete
35787b1294ac: Verifying Checksum
35787b1294ac: Download complete
35787b1294ac: Pull complete
Digest: sha256:5452defe724d2940ae2fd11ec690fbcd1d49cf7607ca9044502f2817c0f76647
Status: Downloaded newer image for discourse/base:2.0.20171231
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2018-04-01T05:10:54.942391 #13]  INFO -- : Loading --stdin
I, [2018-04-01T05:10:54.952542 #13]  INFO -- : > mkdir -p /shared/postgres_run
I, [2018-04-01T05:10:54.959620 #13]  INFO -- : 
I, [2018-04-01T05:10:54.960588 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2018-04-01T05:10:54.964199 #13]  INFO -- : 
I, [2018-04-01T05:10:54.964997 #13]  INFO -- : > chmod 775 /shared/postgres_run
I, [2018-04-01T05:10:54.967599 #13]  INFO -- : 
I, [2018-04-01T05:10:54.968244 #13]  INFO -- : > rm -fr /var/run/postgresql
I, [2018-04-01T05:10:54.971168 #13]  INFO -- : 
I, [2018-04-01T05:10:54.971899 #13]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2018-04-01T05:10:54.974469 #13]  INFO -- : 
I, [2018-04-01T05:10:54.975091 #13]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2018/04/01 05:10:54 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2018-04-01T05:10:54.982479 #13]  INFO -- : 
I, [2018-04-01T05:10:54.983044 #13]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2018-04-01T05:10:54.986313 #13]  INFO -- : 
I, [2018-04-01T05:10:54.986865 #13]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2018-04-01T05:10:54.989894 #13]  INFO -- : 
I, [2018-04-01T05:10:54.990439 #13]  INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2018-04-01T05:10:54.992973 #13]  INFO -- : 
I, [2018-04-01T05:10:54.993637 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2018-04-01T05:10:54.996370 #13]  INFO -- : 
I, [2018-04-01T05:10:55.001625 #13]  INFO -- : File > /etc/service/postgres/run  chmod: +x
I, [2018-04-01T05:10:55.006537 #13]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x
I, [2018-04-01T05:10:55.011732 #13]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
I, [2018-04-01T05:10:55.016554 #13]  INFO -- : File > /root/upgrade_postgres  chmod: +x
I, [2018-04-01T05:10:55.017303 #13]  INFO -- : > chown -R root /var/lib/postgresql/9.5/main
I, [2018-04-01T05:10:55.237527 #13]  INFO -- : 
I, [2018-04-01T05:10:55.237972 #13]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
I, [2018-04-01T05:10:55.241156 #13]  INFO -- : 
I, [2018-04-01T05:10:55.241685 #13]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2018-04-01T05:10:55.282583 #13]  INFO -- : 
I, [2018-04-01T05:10:55.283639 #13]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2018-04-01T05:10:55.287077 #13]  INFO -- : 
I, [2018-04-01T05:10:55.287950 #13]  INFO -- : > /root/upgrade_postgres
I, [2018-04-01T05:10:55.294328 #13]  INFO -- : 
I, [2018-04-01T05:10:55.295154 #13]  INFO -- : > rm /root/upgrade_postgres
I, [2018-04-01T05:10:55.297868 #13]  INFO -- : 
I, [2018-04-01T05:10:55.299166 #13]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.300311 #13]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.301160 #13]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.301990 #13]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.302774 #13]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.303635 #13]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.304388 #13]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2018-04-01T05:10:55.309999 #13]  INFO -- : 
I, [2018-04-01T05:10:55.311048 #13]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.311976 #13]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.312939 #13]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.313824 #13]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.314689 #13]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2018-04-01T05:10:55.315776 #13]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2018-04-01T05:10:55.316672 #13]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2018-04-01T05:10:55.317398 #13]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2018-04-01T05:10:55.319650 #13]  INFO -- : > sleep 5
2018-04-01 05:10:55.379 UTC [47] LOG:  database system was shut down at 2018-04-01 05:10:47 UTC
2018-04-01 05:10:55.383 UTC [47] LOG:  MultiXact member wraparound protections are now enabled
2018-04-01 05:10:55.387 UTC [44] LOG:  database system is ready to accept connections
2018-04-01 05:10:55.389 UTC [51] LOG:  autovacuum launcher started
I, [2018-04-01T05:11:00.325233 #13]  INFO -- : 
I, [2018-04-01T05:11:00.325711 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
2018-04-01 05:11:00.452 UTC [56] postgres@postgres ERROR:  database "discourse" already exists
2018-04-01 05:11:00.452 UTC [56] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2018-04-01T05:11:00.455715 #13]  INFO -- : 
I, [2018-04-01T05:11:00.456345 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2018-04-01 05:11:00.565 UTC [67] postgres@discourse ERROR:  role "discourse" already exists
2018-04-01 05:11:00.565 UTC [67] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2018-04-01T05:11:00.568728 #13]  INFO -- : 
I, [2018-04-01T05:11:00.569341 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2018-04-01T05:11:00.649665 #13]  INFO -- : GRANT

I, [2018-04-01T05:11:00.651489 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2018-04-01T05:11:00.732381 #13]  INFO -- : ALTER SCHEMA

I, [2018-04-01T05:11:00.733202 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2018-04-01T05:11:00.817014 #13]  INFO -- : CREATE EXTENSION

I, [2018-04-01T05:11:00.817643 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2018-04-01T05:11:00.899389 #13]  INFO -- : CREATE EXTENSION

I, [2018-04-01T05:11:00.900043 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2018-04-01T05:11:00.984131 #13]  INFO -- : CREATE EXTENSION

I, [2018-04-01T05:11:00.984810 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2018-04-01T05:11:01.065210 #13]  INFO -- : CREATE EXTENSION

I, [2018-04-01T05:11:01.065891 #13]  INFO -- : > sudo -u postgres psql discourse
I, [2018-04-01T05:11:01.069873 #13]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2018-04-01T05:11:01.164184 #13]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x
I, [2018-04-01T05:11:01.168170 #13]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod: 
I, [2018-04-01T05:11:01.168830 #13]  INFO -- : > echo postgres installed!
I, [2018-04-01T05:11:01.171428 #13]  INFO -- : postgres installed!

I, [2018-04-01T05:11:01.175972 #13]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2018-04-01T05:11:01.180347 #13]  INFO -- : File > /etc/service/redis/log/run  chmod: +x
I, [2018-04-01T05:11:01.184687 #13]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2018-04-01T05:11:01.185651 #13]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2018-04-01T05:11:01.186614 #13]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2018-04-01T05:11:01.190816 #13]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2018-04-01T05:11:01.194130 #13]  INFO -- : 
I, [2018-04-01T05:11:01.194881 #13]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2018-04-01T05:11:01.195695 #13]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2018-04-01T05:11:01.196497 #13]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2018-04-01T05:11:01.197237 #13]  INFO -- : > echo redis installed
I, [2018-04-01T05:11:01.199243 #13]  INFO -- : redis installed

I, [2018-04-01T05:11:01.199887 #13]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2018-04-01T05:11:01.204778 #13]  INFO -- : logfile ""

I, [2018-04-01T05:11:01.205323 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2018-04-01T05:11:01.206939 #13]  INFO -- : > sleep 10
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 159
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

159:M 01 Apr 05:11:01.216 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
159:M 01 Apr 05:11:01.217 # Server started, Redis version 3.0.6
159:M 01 Apr 05:11:01.217 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
159:M 01 Apr 05:11:01.217 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
159:M 01 Apr 05:11:01.351 * DB loaded from disk: 0.134 seconds
159:M 01 Apr 05:11:01.352 * The server is now ready to accept connections on port 6379

…

I, [2018-04-01T05:18:46.818127 #13]  INFO -- : Terminating async processes
I, [2018-04-01T05:18:46.819061 #13]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 44
2018-04-01 05:18:46.819 UTC [44] LOG:  received fast shutdown request
2018-04-01 05:18:46.820 UTC [44] LOG:  aborting any active transactions
I, [2018-04-01T05:18:46.820892 #13]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 159
159:signal-handler (1522559926) Received SIGTERM scheduling shutdown...
2018-04-01 05:18:46.821 UTC [51] LOG:  autovacuum launcher shutting down
2018-04-01 05:18:46.829 UTC [48] LOG:  shutting down
2018-04-01 05:18:46.847 UTC [48] LOG:  database system is shut down
159:M 01 Apr 05:18:46.912 # User requested shutdown...
159:M 01 Apr 05:18:46.913 * Saving the final RDB snapshot before exiting.
159:M 01 Apr 05:18:47.090 * DB saved on disk
159:M 01 Apr 05:18:47.090 # Redis is now ready to exit, bye bye...
sha256:308ba7f73663b521567f5d00a2f784d49d02d22fc7c92fb2a5eb5fa4ff2ed005
a0fd20a59915456f291ee0519e6ed3508157e9b42ac15d27ca568ba384dce369
Removing old container
+ /usr/bin/docker rm app
app

+ /usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=[MYADDRESS] -e DISCOURSE_ONION=[ONION SITE] -e DISCOURSE_DEVELOPER_EMAILS=[MYEMAIL] -e DISCOURSE_SMTP_ADDRESS=[MY MAILSERVER] -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=[SMTPUSERNAME -e DISCOURSE_SMTP_PASSWORD=PASSWORD -e LETSENCRYPT_ACCOUNT_EMAIL=ACCOUNTEMAIL -h an-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address [MAC ADDRESS] local_discourse/app /sbin/boot
d0a8d2b49c0a93462b359778e5335b5f04681032de0bb52686c86856ba312054
1 Like
2018-04-01 05:11:00.452 UTC [56] postgres@postgres ERROR:  database "discourse" already exists
2018-04-01 05:11:00.452 UTC [56] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2018-04-01T05:11:00.455715 #13]  INFO -- : 
I, [2018-04-01T05:11:00.456345 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2018-04-01 05:11:00.565 UTC [67] postgres@discourse ERROR:  role "discourse" already exists
2018-04-01 05:11:00.565 UTC [67] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists

Seems to be a database problem of some kind.

3 Likes

I’ve tried destroying and re-bootstrapping the app, and it gives me the same database error database "discourse" already exists… Is that normal?

Any thoughts on how to get the database to cooperate with the server?

1 Like

Nope, that’s actually normal – see the || true at the end to ignore errors. (Could also do IF NOT EXISTS.)

What’s up with the ellipsis here?

1 Like

Character limit, so I removed the content you’d usually see while rebuilding.

1 Like

Can you give us the bottom couple of lines that were elided there? It’s possible there was an error in there.

This ^^ happens after something went wrong.

1 Like

Here’s a bit before the line I, [2018-04-01T05:18:46.818127 #13] INFO – : Terminating async processes.

Compressing: locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js
uglifyjs '/var/www/discourse/public/assets/locales/_pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js.map' --source-map-url '/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js > /var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js --output=/var/www/discourse/public/assets/locales/pt_BR-6f0847dee592d890620888e9788459e2724473ae06a5b9289bd060176392dafe.js.br


Compressing: locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js
uglifyjs '/var/www/discourse/public/assets/locales/_ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js.map' --source-map-url '/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js > /var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js --output=/var/www/discourse/public/assets/locales/ja-2897f208a4fd1abd24b6dd9de5d045f6acf6a1cd24847cb507468ce768a501ba.js.br


Compressing: locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js
uglifyjs '/var/www/discourse/public/assets/locales/_uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js.map' --source-map-url '/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js > /var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js --output=/var/www/discourse/public/assets/locales/uk-e6f082d6b7d96502074d937dfd6be9f6b54c3cf30873e8b37ed7fc6bd724ffd5.js.br


Compressing: locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js
uglifyjs '/var/www/discourse/public/assets/locales/_zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js.map' --source-map-url '/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js > /var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js --output=/var/www/discourse/public/assets/locales/zh_TW-63eed13078cb882354edd98dc1b8a2acbff98445c98f668c56533b489e512e07.js.br


Compressing: locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js
uglifyjs '/var/www/discourse/public/assets/locales/_zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js.map' --source-map-url '/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js > /var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js --output=/var/www/discourse/public/assets/locales/zh_CN-fdee12a12eba364864636deec5187b96f19bcffae2fa77d459e913f804692522.js.br


Compressing: locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js
uglifyjs '/var/www/discourse/public/assets/locales/_fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js.map' --source-map-url '/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js > /var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js --output=/var/www/discourse/public/assets/locales/fa_IR-cd6c8b388ff9eb24ab3261ec1ac9e8117b7186407936217694aa20973c185d91.js.br


Compressing: locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js
uglifyjs '/var/www/discourse/public/assets/locales/_es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js.map' --source-map-url '/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js > /var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js --output=/var/www/discourse/public/assets/locales/es-da14488e722744adfbd44c3e4f2533f8610cd3daefa4dae9b75eecb4e4573020.js.br


Compressing: locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js
uglifyjs '/var/www/discourse/public/assets/locales/_id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js.map' --source-map-url '/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js > /var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js --output=/var/www/discourse/public/assets/locales/id-a2d666dc439606c8fe97d5e305a8ed7740f81cc4dc3c5c24da65568a42d7e446.js.br


Compressing: locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js
uglifyjs '/var/www/discourse/public/assets/locales/_el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js.map' --source-map-url '/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js > /var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js --output=/var/www/discourse/public/assets/locales/el-45aa175e9e605bb807c665ac188658880179ed194a56e7582d253f0c1755b537.js.br


Compressing: locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js
uglifyjs '/var/www/discourse/public/assets/locales/_fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js' -p relative -c -m -o '/var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js' --source-map-root '/assets/locales' --source-map '/var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js.map' --source-map-url '/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js > /var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js.gz

brotli --quality=11 /var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js --output=/var/www/discourse/public/assets/locales/fr-8f40234c339b09ff41cad6eca384185c646b2ec32ccd6ff593ff194179642ad0.js.br


Compressing: docker-manager-app-0a56d906a59c60abc96e07b2366723947c14402527d1be5505b557e7caf7bb12.js
gzip -f -c -9 /var/www/discourse/public/assets/docker-manager-app-0a56d906a59c60abc96e07b2366723947c14402527d1be5505b557e7caf7bb12.js > /var/www/discourse/public/assets/docker-manager-app-0a56d906a59c60abc96e07b2366723947c14402527d1be5505b557e7caf7bb12.js.gz

brotli --quality=11 /var/www/discourse/public/assets/docker-manager-app-0a56d906a59c60abc96e07b2366723947c14402527d1be5505b557e7caf7bb12.js --output=/var/www/discourse/public/assets/docker-manager-app-0a56d906a59c60abc96e07b2366723947c14402527d1be5505b557e7caf7bb12.js.br


Compressing: docker-manager-vendor-69993a285f235a9550dea5fbb48df8eb27cc48ffb65d68a942744a95ce673fb8.js
gzip -f -c -9 /var/www/discourse/public/assets/docker-manager-vendor-69993a285f235a9550dea5fbb48df8eb27cc48ffb65d68a942744a95ce673fb8.js > /var/www/discourse/public/assets/docker-manager-vendor-69993a285f235a9550dea5fbb48df8eb27cc48ffb65d68a942744a95ce673fb8.js.gz

brotli --quality=11 /var/www/discourse/public/assets/docker-manager-vendor-69993a285f235a9550dea5fbb48df8eb27cc48ffb65d68a942744a95ce673fb8.js --output=/var/www/discourse/public/assets/docker-manager-vendor-69993a285f235a9550dea5fbb48df8eb27cc48ffb65d68a942744a95ce673fb8.js.br


Compressing: application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js
uglifyjs '/var/www/discourse/public/assets/_application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js' -p relative -c -m -o '/var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js' --source-map-root '/assets' --source-map '/var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js.map' --source-map-url '/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js.map'
gzip -f -c -9 /var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js > /var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js.gz

brotli --quality=11 /var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js --output=/var/www/discourse/public/assets/application-3f8cbe8275ba0a1490d629d6ca4a42e1dcd3d7883b1b85967bfc26376f27f4dc.js.br


Start compiling CSS: 2018-04-01 05:18:37 UTC
Compiling css for default 2018-04-01 05:18:37 UTC
precompile target: desktop Top box
precompile target: mobile Top box
precompile target: desktop_rtl Top box
precompile target: mobile_rtl Top box
precompile target: desktop 
precompile target: mobile 
precompile target: desktop_rtl 
precompile target: mobile_rtl 
Done compiling CSS: 2018-04-01 05:18:43 UTC
I, [2018-04-01T05:18:43.657576 #13]  INFO -- : Purging temp files
Bundling assets
Compressing Javascript and Generating Source Maps

I, [2018-04-01T05:18:43.665723 #13]  INFO -- : File > /usr/local/bin/discourse  chmod: +x
I, [2018-04-01T05:18:43.670400 #13]  INFO -- : File > /usr/local/bin/rails  chmod: +x
I, [2018-04-01T05:18:43.675495 #13]  INFO -- : File > /usr/local/bin/rake  chmod: +x
I, [2018-04-01T05:18:43.680153 #13]  INFO -- : File > /usr/local/bin/rbtrace  chmod: +x
I, [2018-04-01T05:18:43.684815 #13]  INFO -- : File > /usr/local/bin/stackprof  chmod: +x
I, [2018-04-01T05:18:43.691512 #13]  INFO -- : File > /etc/update-motd.d/10-web  chmod: +x
I, [2018-04-01T05:18:43.694603 #13]  INFO -- : File > /etc/logrotate.d/rails  chmod: 
I, [2018-04-01T05:18:43.697492 #13]  INFO -- : File > /etc/logrotate.d/nginx  chmod: 
I, [2018-04-01T05:18:43.702684 #13]  INFO -- : File > /etc/runit/1.d/00-ensure-links  chmod: +x
I, [2018-04-01T05:18:43.707673 #13]  INFO -- : File > /root/.bash_profile  chmod: 644
I, [2018-04-01T05:18:43.709514 #13]  INFO -- : Replacing (?-mix:server.+{) with limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
limit_req_status 429;
limit_conn_zone $binary_remote_addr zone=connperip:10m;
limit_conn_status 429;
server {
 in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:43.710529 #13]  INFO -- : Replacing (?-mix:location @discourse {) with location @discourse {
  limit_conn connperip $conn_per_ip;
  limit_req zone=flood burst=$burst_per_second nodelay;
  limit_req zone=bot burst=$burst_per_minute nodelay; in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:43.711730 #13]  INFO -- : > if [ -z "$DISCOURSE_ONION" ]; then echo "DISCOURSE_ONION ENV variable is required and has not been set."; exit 1; fi
I, [2018-04-01T05:18:43.713866 #13]  INFO -- : 
I, [2018-04-01T05:18:43.714352 #13]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.718400 #13]  INFO -- : 
I, [2018-04-01T05:18:43.719198 #13]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with  in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.720090 #13]  INFO -- : Replacing (?m-ix:map[^\}]+\}) with  in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.720864 #13]  INFO -- : Replacing (?m-ix:types[^\}]+\}) with  in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.723359 #13]  INFO -- : Replacing (?-mix:proxy_cache_path.*$) with  in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.724015 #13]  INFO -- : Replacing (?-mix:log_format.*$) with  in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.724916 #13]  INFO -- : Replacing (?-mix:server_name.+$) with server_name $$ENV_DISCOURSE_ONION; in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.725595 #13]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/onion.conf
I, [2018-04-01T05:18:43.726538 #13]  INFO -- : > mkdir -p /shared/ssl/
I, [2018-04-01T05:18:43.729360 #13]  INFO -- : 
I, [2018-04-01T05:18:43.730169 #13]  INFO -- : Replacing (?-mix:server.+{) with server {
  listen 80;
  return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
}
server {
 in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:43.731021 #13]  INFO -- : Replacing (?m-ix:listen 80;\s+gzip on;) with listen 443 ssl http2;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA;
ssl_prefer_server_ciphers on;
ssl_ecdh_curve secp384r1:prime256v1;

ssl_certificate /shared/ssl/ssl.crt;
ssl_certificate_key /shared/ssl/ssl.key;

ssl_session_tickets off;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:1m;

gzip on;

add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain

if ($http_host != $$ENV_DISCOURSE_HOSTNAME) {
   rewrite (.*) https://$$ENV_DISCOURSE_HOSTNAME$1 permanent;
}
 in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:43.732318 #13]  INFO -- : > if [ -z "$LETSENCRYPT_ACCOUNT_EMAIL" ]; then echo "LETSENCRYPT_ACCOUNT_EMAIL ENV variable is required and has not been set."; exit 1; fi
I, [2018-04-01T05:18:43.734390 #13]  INFO -- : 
I, [2018-04-01T05:18:43.734806 #13]  INFO -- : > /bin/bash -c "if [[ ! \"$LETSENCRYPT_ACCOUNT_EMAIL\" =~ ([^@]+)@([^\.]+) ]]; then echo \"LETSENCRYPT_ACCOUNT_EMAIL is not a valid email address\"; exit 1; fi"
I, [2018-04-01T05:18:43.741340 #13]  INFO -- : 
I, [2018-04-01T05:18:43.742234 #13]  INFO -- : > cd /root && git clone https://github.com/Neilpang/acme.sh.git && cd /root/acme.sh && git reset --hard ac0970abbad9390f9ab5e99f7f4043502d40eafa
Cloning into 'acme.sh'...
I, [2018-04-01T05:18:44.819762 #13]  INFO -- : HEAD is now at ac0970a Merge pull request #1131 from Neilpang/dev

I, [2018-04-01T05:18:44.820450 #13]  INFO -- : > touch /var/spool/cron/crontabs/root
I, [2018-04-01T05:18:44.824823 #13]  INFO -- : 
I, [2018-04-01T05:18:44.825383 #13]  INFO -- : > install -d -m 0755 -g root -o root $LETSENCRYPT_DIR
I, [2018-04-01T05:18:44.830007 #13]  INFO -- : 
I, [2018-04-01T05:18:44.830182 #13]  INFO -- : > cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --install --log "${LETSENCRYPT_DIR}/acme.sh.log"
I, [2018-04-01T05:18:45.219559 #13]  INFO -- : [Sun Apr  1 05:18:44 UTC 2018] Installing to /shared/letsencrypt
[Sun Apr  1 05:18:44 UTC 2018] Installed to /shared/letsencrypt/acme.sh
[Sun Apr  1 05:18:44 UTC 2018] Installing alias to '/root/.profile'
[Sun Apr  1 05:18:44 UTC 2018] OK, Close and reopen your terminal to start using acme.sh
[Sun Apr  1 05:18:44 UTC 2018] Installing cron job
[Sun Apr  1 05:18:44 UTC 2018] Good, bash is found, so change the shebang to use bash as preferred.
[Sun Apr  1 05:18:45 UTC 2018] OK

I, [2018-04-01T05:18:45.220401 #13]  INFO -- : > cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade
I, [2018-04-01T05:18:46.798341 #13]  INFO -- : [Sun Apr  1 05:18:45 UTC 2018] Installing from online archive.
[Sun Apr  1 05:18:45 UTC 2018] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Sun Apr  1 05:18:46 UTC 2018] Extracting master.tar.gz
[Sun Apr  1 05:18:46 UTC 2018] Installing to /shared/letsencrypt
[Sun Apr  1 05:18:46 UTC 2018] Installed to /shared/letsencrypt/acme.sh
[Sun Apr  1 05:18:46 UTC 2018] Installing alias to '/root/.profile'
[Sun Apr  1 05:18:46 UTC 2018] OK, Close and reopen your terminal to start using acme.sh
[Sun Apr  1 05:18:46 UTC 2018] Good, bash is found, so change the shebang to use bash as preferred.
[Sun Apr  1 05:18:46 UTC 2018] OK
[Sun Apr  1 05:18:46 UTC 2018] Install success!
[Sun Apr  1 05:18:46 UTC 2018] Upgrade success!

I, [2018-04-01T05:18:46.802039 #13]  INFO -- : File > /etc/nginx/letsencrypt.conf  chmod: 
I, [2018-04-01T05:18:46.806890 #13]  INFO -- : File > /etc/runit/1.d/letsencrypt  chmod: +x
I, [2018-04-01T05:18:46.807619 #13]  INFO -- : Replacing (?-mix:ssl_certificate.+) with ssl_certificate /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.cer;
 in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:46.808403 #13]  INFO -- : Replacing (?-mix:#?ACCOUNT_EMAIL=.+) with ACCOUNT_EMAIL=$$ENV_LETSENCRYPT_ACCOUNT_EMAIL
 in /shared/letsencrypt/account.conf
I, [2018-04-01T05:18:46.809186 #13]  INFO -- : Replacing (?-mix:ssl_certificate_key.+) with ssl_certificate_key /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.key;
 in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:46.810131 #13]  INFO -- : Replacing (?-mix:add_header.+) with add_header Strict-Transport-Security 'max-age=63072000'; in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:46.810904 #13]  INFO -- : Replacing (?m-ix:add_header Referrer-Policy 'no-referrer-when-downgrade';) with add_header Referrer-Policy 'no-referrer-when-downgrade';
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain in /etc/nginx/conf.d/discourse.conf
I, [2018-04-01T05:18:46.811791 #13]  INFO -- : > echo "Beginning of custom commands"
I, [2018-04-01T05:18:46.814193 #13]  INFO -- : Beginning of custom commands

I, [2018-04-01T05:18:46.814714 #13]  INFO -- : > echo "End of custom commands"
I, [2018-04-01T05:18:46.816848 #13]  INFO -- : End of custom commands

I, [2018-04-01T05:18:46.818127 #13]  INFO -- : Terminating async processes
1 Like

Oh wait, was there not even an error???

Okay that was pretty silly.

Let’s check:

  • are you using an external-to-container proxy (“Multiple websites on same machine”)
  • if not, are the expose ports set up correctly in app.yml
  • try using curl from the machine
4 Likes

Appreciate the assistance!

Exactly, I’m not seeing any terribly unusual errors, and the app won’t load. :confused: Here’s my app.yml:

me@me:/var/discourse# nano containers/app.yml

  GNU nano 2.5.3                                                    File: containers/app.yml                                                                                                                

## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  #- "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.onion.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https
params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "128MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 2

  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: ‘xxxxx.com’

  ## ONION Config
  DISCOURSE_ONION: ‘xxxxxxxxxxxxxxxx.onion'

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: ‘example@example.com’

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: smtp.mail.org         # required
  DISCOURSE_SMTP_PORT: 587                        # (optional, default 587)
  DISCOURSE_SMTP_USER_NAME: postmaster@mail.com      # required
  DISCOURSE_SMTP_PASSWORD: [mypassword]               # required, WARNING the char '#' in pw can cause problems!
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: example@example.com

  ## The CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          #- git clone https://github.com/auth0/discourse-plugin.git auth0

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

And a curl request:

me@me:~# curl http://example.com
<!doctype html>
<html>
<head>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
        
    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 50px;
        background-color: #fff;
        border-radius: 1em;
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        body {
            background-color: #fff;
        }
        div {
            width: auto;
            margin: 0 auto;
            border-radius: 0;
            padding: 1em;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is established to be used for illustrative examples in documents. You may use this
    domain in examples without prior coordination or asking for permission.</p>
    <p><a href="http://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
1 Like

You’re actually retrieving example.com instead of your own site…?

1 Like

Somewhat new to this space, so I didn’t know entirely what @riking was asking for… Appreciate your patience.

If we’re asking to curl my site, here’s that:

me@me:~# curl [my site].com

&lt;html&gt;

&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;

&lt;body bgcolor="white"&gt;

&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;

&lt;hr&gt;&lt;center&gt;nginx/1.12.1&lt;/center&gt;

&lt;/body&gt;

&lt;/html&gt; 
1 Like

Thanks for the help so far… It gives me hope I might actually be able to download updates for my forum without taking it down. :sweat:

One more follow-up. Any other troubleshooting approaches that might be helpful here? I can’t update my site at all. :frowning: Thanks so much.

Update: I was not able to find a solution to this problem and, because it’s a clear security risk to to leave Discourse unpatched, I’ve shut down the forum.

I appreciate the guidance from the posters above. Thank you.