Remove PostgreSQL host port exposure for production #132
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: medium — must be resolved before production deployment
docker-compose.ymlexposes the PostgreSQL port to the host (line 14):On a production VPS, this makes port 5432 reachable from outside the Docker network. The backend connects via the internal
archive-netnetwork — there is no legitimate reason to expose this port.What to do
In the production compose file/overlay, replace
portswithexpose:exposemakes the port available to other containers on the same network but not to the host or external traffic.The development
docker-compose.ymlcan keepportsfor connecting with local DB tools (e.g. DBeaver, psql).