read.markets/docker-compose.prod.yml
Giorgio Gilestro a50c5091c4 deploy: split compose into base (prod-ready) + dev override
Compose merges list-typed fields like \`ports\` by concatenation, so the
previous prod overlay couldn't clear the base file's host port binding;
the VPS app ended up listening on both port 80 (intranet) AND host port
8800 simultaneously.

Restructured to the conventional dev/prod split:
- docker-compose.yml: no host port — prod-ready by default
- docker-compose.override.yml: dev-only host port binding (auto-loaded
  by \`docker compose up\` locally, skipped when prod uses explicit -f)
- docker-compose.prod.yml: command-port 80 + intranet network only

Production invocation:
  docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:30:28 +01:00

25 lines
807 B
YAML

# Production overlay. Applied on the VPS with:
#
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# Drops the host port binding entirely and joins the `intranet` external
# Docker network so a front-side proxy (Nginx Proxy Manager) on the same
# network can reach the container directly. The app listens on port 80
# inside the container so NPM upstreams are uniform across services
# (always `<container-name>:80`).
#
# The local-dev compose (just `docker-compose.yml` alone) still binds to
# the host port from `.env` / CASSANDRA_PORT — unchanged.
services:
app:
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--workers", "1"]
expose:
- "80"
networks:
- default
- intranet
networks:
intranet:
external: true