Postgres already running

Hello all,

Apologies if I sound dumb, as I’m new to this, however, I’m trying to run two websites on my Ubuntu 16.04, Pterodactyl Panel and Discourse, I got Pterodactyl Panel working, and Discourse works without Nginx, however when i follow these instructions: https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247

However after setting discourse up for Nginx, I get this error after rebuild with the command: /var/discourse/launcher rebuild app

I get this error:.

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
** 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

Any help would be much appreciated!

Thanks!

Move from standalone container to separate web and data containers will give you some hints on how to have a separate data container. See also the multisite howto which describes creating multiple databases.

Interesting, I will take a look at that, so that should fix my issue? Or is there something else I could look at in the meantime?

You can’t run two postgres servers,so you’ll need to get both applications to use the same one. Mostly, you add the discourse database to the existing server and put the user, password, and host values in environment variables in your yml file.