fix: remove backend/frontend host port mappings from base compose
Docker Compose merges port arrays from base + override files, so the base 3000:3000 and the prod overlay 127.0.0.1:3000:3000 conflicted. Removed direct host port mappings from the base — dev traffic already routes through the Docker nginx on port 80 via the bridge network. The prod overlay cleanly adds loopback-only mappings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile.dev
|
dockerfile: Dockerfile.dev
|
||||||
ports:
|
# No host port mapping — dev traffic goes through the Docker nginx container.
|
||||||
- "3000:3000"
|
# Production overlay maps 127.0.0.1:3000 for the host reverse proxy.
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=${DATABASE_URL}
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
- REDIS_URL=${REDIS_URL}
|
- REDIS_URL=${REDIS_URL}
|
||||||
@@ -43,8 +43,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile.dev
|
dockerfile: Dockerfile.dev
|
||||||
ports:
|
# No host port mapping — dev traffic goes through the Docker nginx container.
|
||||||
- "5173:5173"
|
# Production overlay maps 127.0.0.1:3001 for the host reverse proxy.
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=${NODE_ENV}
|
- NODE_ENV=${NODE_ENV}
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user