Docker Compose merges port lists from multiple -f files by concatenation. Without !reset, both 0.0.0.0:8000:8000 (base) and 127.0.0.1:8000:8000 (prod override) are applied simultaneously, causing "port already allocated". !reset clears the list before applying prod-specific bindings (requires Docker Compose v2.24+, available in current docker-compose-plugin via apt). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
856 B
YAML
36 lines
856 B
YAML
# Production overrides for DeckForge
|
|
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml <command>
|
|
#
|
|
# Changes from base:
|
|
# - All ports bound to 127.0.0.1 (Apache reverse proxy, Docker bypasses UFW otherwise)
|
|
# - postgres/redis ports removed (internal Docker network only)
|
|
# - nginx service excluded (Apache on host replaces it)
|
|
# - PYTHONUNBUFFERED=1 on api for log visibility
|
|
# - basePath env vars for Next.js
|
|
|
|
services:
|
|
postgres:
|
|
ports: !reset []
|
|
|
|
redis:
|
|
ports: !reset []
|
|
|
|
api:
|
|
ports: !reset
|
|
- "127.0.0.1:${API_PORT:-8000}:8000"
|
|
environment:
|
|
PYTHONUNBUFFERED: "1"
|
|
|
|
worker:
|
|
environment:
|
|
PYTHONUNBUFFERED: "1"
|
|
|
|
web:
|
|
ports: !reset
|
|
- "127.0.0.1:${WEB_PORT:-3000}:3000"
|
|
environment:
|
|
NEXT_PUBLIC_BASE_PATH: "/ppt-tool"
|
|
|
|
nginx:
|
|
profiles:
|
|
- disabled
|