compdemocracy / polis

:milky_way: Open Source AI for large scale open ended feedback
https://pol.is
GNU Affero General Public License v3.0
753 stars 173 forks source link

fix bug with running on custom postgres port #1749

Closed metasoarous closed 5 days ago

metasoarous commented 10 months ago

The ability to override is important for dev machines which already have postgres running locally/natively on the host machine. An earlier attempt was made to fix this, but failed because the ports mapping in the dev overlay file does not change the port the other containers use to access the container, just how the port is exposed to the host system (for utility connection, etc). The fix so that everything internal and external all uses the same port involves setting the PGPORT setting, so that the postgres container actually uses this port internally, and the expose declaration, which ensures that this port is then exposed to the rest of the network.

lpalazzi commented 2 weeks ago

@metasoarous Is there a way to fix this issue while using a remote/hosted database? Adding the correct connection params in the .env file does not seem to work (same error as #1751), even with the changes listed in this PR.

raulsperoni commented 2 weeks ago

+1, it would be amazing to be able to use an external/managed postgres instance

ballPointPenguin commented 5 days ago

Closing in favor of https://github.com/compdemocracy/polis/pull/1817