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:
@@ -77,6 +77,9 @@ services:
|
||||
-c checkpoint_completion_target=0.9
|
||||
-c wal_buffers=16MB
|
||||
-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:
|
||||
resources:
|
||||
limits:
|
||||
@@ -86,4 +89,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user