perf: remove unnecessary postgres/redis host port mappings in production

Backend reaches postgres and redis over the Docker network (hoanet),
so host port mappings are unnecessary. Removing them eliminates 4
docker-proxy processes and closes 0.0.0.0:5432 and 0.0.0.0:6379
which were publicly reachable — a security and performance fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 14:52:09 -05:00
parent 337b6061b2
commit 0a07c61ca3

View File

@@ -77,6 +77,9 @@ services:
-c checkpoint_completion_target=0.9 -c checkpoint_completion_target=0.9
-c wal_buffers=16MB -c wal_buffers=16MB
-c random_page_cost=1.1 -c random_page_cost=1.1
# No host port mapping — backend reaches postgres via the Docker network.
# Removes 2 docker-proxy processes and closes 0.0.0.0:5432 to the internet.
ports: []
deploy: deploy:
resources: resources:
limits: limits:
@@ -86,4 +89,7 @@ services:
restart: unless-stopped restart: unless-stopped
redis: redis:
# No host port mapping — backend reaches redis via the Docker network.
# Removes 2 docker-proxy processes and closes 0.0.0.0:6379 to the internet.
ports: []
restart: unless-stopped restart: unless-stopped