Postgres 已在运行

大家好,

如果我听起来很笨拙,请见谅,因为我是新手。不过,我试图在 Ubuntu 16.04 上同时运行两个网站:Pterodactyl Panel 和 Discourse。我已经成功让 Pterodactyl Panel 运行起来,Discourse 在没有 Nginx 的情况下也能正常工作。但是,当我按照以下说明操作时:https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247

在为 Discourse 配置 Nginx 后,我使用以下命令重新构建时遇到了错误:

/var/discourse/launcher rebuild app

我得到了以下错误:

FAILED
--------------------
Pups::ExecError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 failed with return #<Process::Status: pid 1928 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1"
4deb791432a587b5cc6777001a71fd6391e5982fe830f339115c2002e07c17fb
** 启动失败 ** 请向上滚动并查找更早的错误信息,可能不止一条。
./discourse-doctor 可能有助于诊断问题

任何帮助都将不胜感激!

谢谢!

Move from standalone container to separate web and data containers 将为您提供有关如何设置独立数据容器的一些提示。另请参阅多站点 howto,其中介绍了创建多个数据库的方法。

有意思,我会去看看。这样就能解决我的问题了吗?或者在此期间还有什么其他方面我可以关注的?

您无法运行两个 PostgreSQL 服务器,因此需要让两个应用程序共用同一个服务器。通常的做法是将 Discourse 数据库添加到现有服务器中,并在您的 yml 文件中通过环境变量设置用户名、密码和主机值。