谢谢你的回复,Jay。
我已经在整个日志中搜索了错误行,也许它是由以下原因引起的:
2023-06-08 01:19:04.972 UTC [55] postgres@template1 ERROR: database "discourse" already exists
2023-06-08 01:19:04.972 UTC [55] postgres@template1 STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2023-06-08T01:19:04.977485 #1] INFO -- :
I, [2023-06-08T01:19:04.978414 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-06-08 01:19:05.654 UTC [59] postgres@discourse ERROR: role "discourse" already exists
2023-06-08 01:19:05.654 UTC [59] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
这是我在服务器上的第一次安装,但我因为其他错误(如 My server can access github, but docker can’t - #2 by whitewaterdeu)而多次重建应用程序。
我不知道何时创建了数据库,也不知道如何修复它。