fix: Remove port exposure for production deployment

- Remove port bindings from base compose (production)
- Keep ports only in dev override
- Remove obsolete version attribute

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-01-29 19:41:22 +00:00
parent 16275b3a9b
commit 9b815a90d6
2 changed files with 3 additions and 19 deletions

View File

@ -1,5 +1,3 @@
version: "3.8"
# Development overrides - use with: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
services:
@ -12,9 +10,6 @@ services:
- "6379:6379"
backend:
build:
context: ./backend
dockerfile: Dockerfile
volumes:
# Mount source for hot reload
- ./backend/app:/app/app:ro
@ -30,13 +25,13 @@ services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=http://localhost:8000/api
ports:
- "3000:3000"
networks:
swag-internal:
driver: bridge
traefik-public:
driver: bridge # Override external for local dev

View File

@ -1,5 +1,3 @@
version: "3.8"
services:
# PostgreSQL Database
db:
@ -19,10 +17,8 @@ services:
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432" # Expose for local dev, remove in production
# Redis for sessions/cache (optional)
# Redis for sessions/cache
redis:
image: redis:7-alpine
container_name: swag-redis
@ -31,8 +27,6 @@ services:
- swag-redis-data:/data
networks:
- swag-internal
ports:
- "6379:6379" # Expose for local dev
# FastAPI Backend
backend:
@ -54,7 +48,6 @@ services:
- DESIGNS_PATH=/app/designs
- CONFIG_PATH=/app/config
volumes:
# Mount designs from mycopunk-swag repo
- ${DESIGNS_PATH:-../mycopunk-swag/designs}:/app/designs:ro
- ${CONFIG_PATH:-../mycopunk-swag/config}:/app/config:ro
depends_on:
@ -63,8 +56,6 @@ services:
networks:
- swag-internal
- traefik-public
ports:
- "8000:8000" # Expose for local dev
labels:
- "traefik.enable=true"
- "traefik.http.routers.swag-api.rule=Host(`swag.mycofi.earth`) && PathPrefix(`/api`)"
@ -89,8 +80,6 @@ services:
networks:
- swag-internal
- traefik-public
ports:
- "3000:3000" # Expose for local dev
labels:
- "traefik.enable=true"
- "traefik.http.routers.swag-web.rule=Host(`swag.mycofi.earth`)"