Merge pull request #226 from aronchick/security/bind-ports-to-localhost

security: bind redis and postgres ports to localhost only
This commit is contained in:
Abhimanyu Saharan
2026-03-05 20:50:29 +05:30
committed by GitHub

View File

@@ -10,7 +10,7 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
@@ -20,7 +20,7 @@ services:
redis:
image: redis:7-alpine
ports:
- "${REDIS_PORT:-6379}:6379"
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s