Skip to content

Commit 862f513

Browse files
committed
fix(docker): secure port bindings for production
- Remove PostgreSQL public port exposure - Restrict backend to localhost-only access (127.0.0.1:8080) - Services now only accessible via reverse proxy
1 parent 0aaeb8e commit 862f513

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ services:
99
POSTGRES_USER: ${DB_USER}
1010
POSTGRES_PASSWORD: ${DB_PASSWORD}
1111
POSTGRES_DB: ${DB_NAME}
12-
ports:
13-
- "5432:5432"
1412
volumes:
1513
- postgres_data:/var/lib/postgresql/data
1614
healthcheck:
@@ -30,7 +28,7 @@ services:
3028
postgres:
3129
condition: service_healthy
3230
ports:
33-
- "8080:8080"
31+
- "127.0.0.1:8080:8080"
3432

3533
volumes:
3634
postgres_data:

0 commit comments

Comments
 (0)