构建 Bootstrap 错误

这是另一个帖子中的一个问题,但我想单独发帖,因为我认为它们不是同一个问题。
(之前的帖子:Attempted to upgrade and I think I messed something up - installation - Discourse Meta

这是我收到的错误:

Here is a provided discourse-doctor:

DISCOURSE DOCTOR Sun Nov 20 09:15:03 CET 2022
OS: Linux discourse 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forum.arcaneodyssey.dev
SMTP_ADDRESS=smtp.mailgun.org
DEVELOPER_EMAILS=REDACTED
SMTP_PASSWORD=REDACTED
SMTP_PORT=587
SMTP_USER_NAME=headless@mg.arcaneodyssey.dev
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 20.10.17, build 100c701

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
2.0.20220818-0047: Pulling from discourse/base
Digest: sha256:7734701087766821ffb2ddcef423754798bd345c2ac0d550131c6e6905c268e8
Status: Image is up to date for discourse/base:2.0.20220818-0047
docker.io/discourse/base:2.0.20220818-0047
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2022-11-20T08:15:17.743545 #1]  INFO -- : Reading from stdin
I, [2022-11-20T08:15:17.750195 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2022-11-20T08:15:17.821419 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2022-11-20T08:15:17.822016 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2022-11-20T08:15:17.828573 #1]  INFO -- :
I, [2022-11-20T08:15:17.828983 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2022-11-20T08:15:17.835258 #1]  INFO -- :
I, [2022-11-20T08:15:17.835802 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2022-11-20T08:15:17.841674 #1]  INFO -- :
I, [2022-11-20T08:15:17.842214 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2022-11-20T08:15:17.852475 #1]  INFO -- :
I, [2022-11-20T08:15:17.853152 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2022-11-20T08:15:17.861073 #1]  INFO -- :
I, [2022-11-20T08:15:17.861483 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2022/11/20 08:15:17 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): Connection refused
I, [2022-11-20T08:15:17.884029 #1]  INFO -- :
I, [2022-11-20T08:15:17.884295 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2022-11-20T08:15:17.893978 #1]  INFO -- :
I, [2022-11-20T08:15:17.894223 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2022-11-20T08:15:17.904166 #1]  INFO -- :
I, [2022-11-20T08:15:17.904633 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-11-20T08:15:17.914232 #1]  INFO -- :
I, [2022-11-20T08:15:17.915141 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-11-20T08:15:17.924943 #1]  INFO -- :
I, [2022-11-20T08:15:17.942637 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2022-11-20T08:15:17.959607 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2022-11-20T08:15:17.976957 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2022-11-20T08:15:17.993223 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2022-11-20T08:15:17.994050 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2022-11-20T08:15:19.352619 #1]  INFO -- :
I, [2022-11-20T08:15:19.353073 #1]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2022-11-20T08:15:19.361583 #1]  INFO -- :
I, [2022-11-20T08:15:19.361755 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2022-11-20T08:15:19.391741 #1]  INFO -- :
I, [2022-11-20T08:15:19.392151 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2022-11-20T08:15:19.403291 #1]  INFO -- :
I, [2022-11-20T08:15:19.404047 #1]  INFO -- : > /root/upgrade_postgres
I, [2022-11-20T08:15:19.417773 #1]  INFO -- :
I, [2022-11-20T08:15:19.418044 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2022-11-20T08:15:19.426190 #1]  INFO -- :
I, [2022-11-20T08:15:19.427184 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.428982 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.430022 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.431344 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.432179 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.433198 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.434011 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2022-11-20T08:15:19.440970 #1]  INFO -- :
I, [2022-11-20T08:15:19.441823 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.442798 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.443593 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2022-11-20T08:15:19.444290 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2022-11-20T08:15:19.444994 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-11-20T08:15:19.445642 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-11-20T08:15:19.446164 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2022-11-20T08:15:19.452150 #1]  INFO -- : > sleep 5
2022-11-20 08:15:19.593 UTC [42] LOG:  starting PostgreSQL 13.8 (Debian 13.8-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-11-20 08:15:19.593 UTC [42] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-11-20 08:15:19.593 UTC [42] LOG:  listening on IPv6 address "::", port 5432
2022-11-20 08:15:19.619 UTC [42] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-11-20 08:15:19.653 UTC [45] LOG:  database system shutdown was interrupted; last known up at 2022-11-20 08:13:26 UTC
2022-11-20 08:15:19.961 UTC [45] LOG:  database system was not properly shut down; automatic recovery in progress
2022-11-20 08:15:19.976 UTC [45] LOG:  redo starts at 20E/B7706EE0
2022-11-20 08:15:21.251 UTC [45] LOG:  successfully skipped missing contrecord at 20E/C95C8360, overwritten at 2022-11-20 07:39:48.040705+00
2022-11-20 08:15:21.251 UTC [45] CONTEXT:  WAL redo at 20E/C95CA018 for XLOG/OVERWRITE_CONTRECORD: lsn 20E/C95C8360; time 2022-11-20 07:39:48.040705+00
2022-11-20 08:15:21.251 UTC [45] LOG:  invalid record length at 20E/C95CA048: wanted 24, got 0
2022-11-20 08:15:21.251 UTC [45] LOG:  redo done at 20E/C95CA018
I, [2022-11-20T08:15:24.460654 #1]  INFO -- :
I, [2022-11-20T08:15:24.461528 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2022-11-20 08:15:24.533 UTC [49] postgres@postgres FATAL:  the database system is starting up
2022-11-20 08:15:24.534 UTC [50] postgres@template1 FATAL:  the database system is starting up
createdb: error: could not connect to database template1: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2022-11-20T08:15:24.539304 #1]  INFO -- :
I, [2022-11-20T08:15:24.539843 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2022-11-20 08:15:24.612 UTC [54] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2022-11-20T08:15:24.616482 #1]  INFO -- :
I, [2022-11-20T08:15:24.616934 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
2022-11-20 08:15:24.700 UTC [58] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2022-11-20T08:15:24.705092 #1]  INFO -- :
I, [2022-11-20T08:15:24.705843 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
2022-11-20 08:15:24.768 UTC [62] postgres@discourse FATAL:  the database system is starting up
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  the database system is starting up
I, [2022-11-20T08:15:24.772170 #1]  INFO -- :
I, [2022-11-20T08:15:24.772719 #1]  INFO -- : Terminating async processes
I, [2022-11-20T08:15:24.772781 #1]  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/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
2022-11-20 08:15:24.772 UTC [42] LOG:  received fast shutdown request
I, [2022-11-20T08:15:34.774465 #1]  INFO -- : HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid:42 did not terminate cleanly, forcing termination!


FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 59 exit 2>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
bootstrap failed with exit code 2
** 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.
6df5d11e52ff56940d63e1e901ca8c5da49e5037e77e507175f921e1de360d7d
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to forum.arcaneodyssey.dev succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -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_FORCE_HTTPS=true -e DISCOURSE_HOSTNAME=forum.arcaneodyssey.dev -e DISCOURSE_DEVELOPER_EMAILS=REDACTED  -e DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=headless@mg.arcaneodyssey.dev -e DISCOURSE_SMTP_PASSWORD=REDACTED  -e LETSENCRYPT_ACCOUNT_EMAIL=REDACTED  -h discourse-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /mnt/volume-2/standalone:/shared -v /mnt/volume-2/standalone/log/var-log:/var/log -v /mnt/volume-fsn1-1/uploads:/shared/uploads --mac-address 02:f9:8c:dd:3d:63 local_discourse/app /sbin/boot
Unable to find image 'local_discourse/app:latest' locally
docker: Error response from daemon: pull access denied for local_discourse/app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Failed to restart the container.


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-chat-integration.git
          - git clone https://github.com/discourse/discourse-whos-online.git
          - git clone https://github.com/discourse/discourse-voting.git
          - git clone https://github.com/discourse/discourse-checklist
          - git clone https://github.com/discourse/discourse-patreon.git
          - git clone https://github.com/discourse/discourse-calendar.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/angusmcleod/discourse-ratings.git
          - git clone https://github.com/paviliondev/discourse-follow.git
          - git clone https://github.com/paviliondev/discourse-topic-previews-sidecar
          - git clone https://github.com/paviliondev/discourse-tc-topic-list-previews

WARNING:
You have what appear to be non-official plugins.
If you are having trouble, you should disable them and try rebuilding again.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at forum.arcaneodyssey.dev: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 16038

              total        used        free      shared  buff/cache   available
Mem:          15662         287        6931           0        8442       15087
Swap:          2047          30        2017

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        19G   11G  7.2G  60% /

==================== DISK INFORMATION ====================
Disk /dev/sda: 19.1 GiB, 20480786432 bytes, 40001536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DA375F37-9B26-488D-A076-9130E80D2481

Device      Start      End  Sectors Size Type
/dev/sda1  129024 40001502 39872479  19G Linux filesystem
/dev/sda14   2048     4095     2048   1M BIOS boot
/dev/sda15   4096   129023   124928  61M EFI System

Partition table entries are not in disk order.


Disk /dev/sdb: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdc: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Mail test skipped.

==================== DONE! ====================

You can examine the output of this script with
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called 'less'):
q              -- quit
/error<ENTER>  -- search for the word 'error'
n              -- search for the next occurrence
g              -- go to the beginning of the file
f              -- go forward a page
b              -- go back a page
G              -- go to the end of the file

Seems like issues relating to the database?

有几个插件看起来有点过时。您可以尝试更换它们并重新构建。

https://github.com/paviliondev/discourse-follow.git 现在是官方的 Discourse 插件 - https://github.com/discourse/discourse-follow

https://github.com/discourse/discourse-voting.git 已重命名,现在是 https://github.com/discourse/discourse-topic-voting

https://github.com/paviliondev/discourse-tc-topic-list-previews 是一个主题组件,不应安装在 app.yml 中。

即使进行了建议的修复,结果如下:

          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-chat-integration.git
          - git clone https://github.com/discourse/discourse-whos-online.git
          - git clone https://github.com/discourse/discourse-topic-voting
          - git clone https://github.com/discourse/discourse-checklist
          - git clone https://github.com/discourse/discourse-patreon.git
          - git clone https://github.com/discourse/discourse-calendar.git
          - mkdir -p plugins
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/angusmcleod/discourse-ratings.git
          - git clone https://github.com/discourse/discourse-follow
          - git clone https://github.com/paviliondev/discourse-topic-previews-sidecar
          - git clone https://github.com/discourse/discourse-reactions

我仍然收到相同的错误。

我不确定为什么 - mkdir -p plugins 会出现在那个列表的中间?那个列表是来自你的 app.yml 吗?

@Headless 请分享您已编辑的 app.yml

好问题,我刚把它移到了顶部,它在中间是因为我在添加插件时,需要它的插件排在了它后面,我刚修复了这个问题并把它放在了顶部,但仍然没有成功。

有用于隐藏的命令吗?还是我必须自己隐藏。

我不确定是否存在某个命令,我通常是手动进行编辑。

1 个赞

这里是

## 这是全功能的、独立的 Discourse Docker 容器模板
##
## 修改此文件后,您必须重建
## /var/discourse/launcher rebuild app
##
## 编辑时请*极其小心*!
## YAML 文件对空格或对齐错误非常非常敏感!
## 如有需要,请访问 http://www.yamllint.com/ 来验证此文件

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/cloudflare.template.yml"
## 如果您想添加 Lets Encrypt (https),请取消注释这两行
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## 此容器应公开哪些 TCP/IP 端口?
## 如果您希望 Discourse 与 Apache 或 nginx 等其他 Web 服务器共享端口,
## 请参阅 https://meta.discourse.org/t/17247 获取详细信息
expose:
  - "80:80"   # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## 将 db_shared_buffers 设置为总内存的最多 25%。
  ## 将由 bootstrap 根据检测到的 RAM 自动设置,或者您可以覆盖它
  db_shared_buffers: "1792MB"

  ## 可以提高排序性能,但会增加每个连接的内存使用量
  #db_work_mem: "40MB"

  ## 此容器应使用哪个 Git 版本? (默认: tests-passed)
  #version: tests-passed

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

  ## 支持多少并发 Web 请求?取决于内存和 CPU 核心。
  ## 将由 bootstrap 根据检测到的 CPU 自动设置,或者您可以覆盖它
  UNICORN_WORKERS: 4

  ## TODO: 此 Discourse 实例将响应的域名
  ## 必需。Discourse 不能使用裸 IP 地址。
  DISCOURSE_HOSTNAME: forum.arcaneodyssey.dev

  ## 如果您希望容器以与上面指定的相同的主机名 (-h 选项) 启动,请取消注释
  ## (默认值“$hostname-$config”)
  #DOCKER_USE_HOSTNAME: true

  ## TODO: 将被设为管理员和开发者的逗号分隔的电子邮件列表
  ## 首次注册时,例如“user1@example.com,user2@example.com”
  DISCOURSE_DEVELOPER_EMAILS: REDACTED

  ## TODO: 用于验证新帐户和发送通知的 SMTP 邮件服务器
  # SMTP 地址、用户名和密码是必需的
  # 注意 SMTP 密码中的字符 '#' 可能会导致问题!
  DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: REDACTED
  DISCOURSE_SMTP_PASSWORD: REDACTED
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (可选,默认 true)

  ## 如果您添加了 Lets Encrypt 模板,请取消注释下方以获取免费 SSL 证书
  LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

  ## 此 Discourse 实例的 HTTP 或 HTTPS CDN 地址(配置为拉取)
  ## 请参阅 https://meta.discourse.org/t/14857 获取详细信息
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com

## Docker 容器是无状态的;所有数据都存储在 /shared 中
volumes:
  - volume:
      host: /mnt/volume-2/standalone
      guest: /shared
  - volume:
      host: /mnt/volume-2/standalone/log/var-log
      guest: /var/log
  - volume:
      host: /mnt/volume-fsn1-1/uploads
      guest: /shared/uploads

## 插件放在这里
## 请参阅 https://meta.discourse.org/t/19157 获取详细信息
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-whos-online.git
          - git clone https://github.com/discourse/discourse-topic-voting
          - git clone https://github.com/discourse/discourse-checklist
#          - git clone https://github.com/discourse/discourse-patreon.git
#          - git clone https://github.com/discourse/discourse-calendar.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/angusmcleod/discourse-ratings.git
          - git clone https://github.com/discourse/discourse-follow
          - git clone https://github.com/paviliondev/discourse-topic-previews-sidecar
          - git clone https://github.com/discourse/discourse-reactions
run:
  - exec: echo "开始自定义命令"
  ## 如果您想为首次注册设置“发件人”电子邮件地址,请取消注释并更改:
  ## 获取首次注册电子邮件后,请重新注释该行。它只需要运行一次。
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "自定义命令结束"

检查 Pavilion ratings 插件也显示它有一个新的仓库地址——https://github.com/paviliondev/discourse-ratings

但让我们也看看你的 app.yml,正如 @itsbhanusharma 所建议的。:+1:

1 个赞

刚更新了,还是不行。

删除所有第三方插件并尝试重新构建。

已将它们全部注释掉(mkdir 和 docker 除外),但仍然无效。

错误是一样的吗?

是的,这确实是同一个错误。

我也尝试过多次卸载/重新安装 Docker 来解决此问题。

docker psdocker ps -a 分别显示什么?

image
可惜什么都没有

您目前在错误中看到的是 PostgreSQL 未按预期工作。错误来源尚不清楚。@JammyDodger 有什么想法吗?

1 个赞

我也曾有过这种假设,只是不知道如何通过 Discourse 使用 PostgreSQL。

这很奇怪,因为我的问题在之前的帖子里已经解决了,然后当我添加 discourse-reactions 并尝试重建时,我开始遇到这个问题。现在即使不添加插件,什么都无法工作了,哈哈。