Files
meshcore-hub/docker-compose.prod.yml
T
Louis King 5a8794f5c9 fix(compose): keep bundled postgres out of the core profile in production
Starting core with docker-compose.prod.yml also started the bundled
postgres container, whose 'postgres' network alias shadowed a shared
instance of the same name on the same Docker network — the live site
silently talked to an empty local database instead of DATABASE_HOST.

- Base file: postgres profiles are now [all, postgres] (core dropped);
  the dev override unions 'core' back in, so the documented dev
  workflow (make up, --profile core) is unchanged
- migrate's postgres dependency is required: false — still health-gated
  when the bundled container is active, skipped when profile-inactive
- prod override documents the behavior; opt in explicitly with
  --profile postgres (or --profile all) for a bundled production DB
- Docs: database.md/deployment.md/configuration.md/README/.env.example
  updated; upgrading.md gains a one-time cleanup runbook (full down to
  remove the previously started hub-postgres container)
2026-08-30 11:22:08 +01:00

47 lines
1.2 KiB
YAML

# MeshCore Hub - Production Docker Compose Override
#
# Connects core services to an external proxy network for
# reverse proxy access (Traefik, Nginx, Caddy, etc.).
# No ports are exposed directly — all traffic goes through the reverse proxy.
#
# NOTE: the bundled 'postgres' service is NOT started by the 'core' profile
# with this override (that convenience is dev-only, via docker-compose.dev.yml).
# Point the DATABASE_* variables at your shared/external instance instead —
# starting the bundled container alongside it would shadow a 'postgres' host
# on the same network. Opt in explicitly with `--profile postgres` (or
# `--profile all`) if you really want the bundled database on this host.
#
# Prerequisites:
# docker network create proxy-net
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# With Traefik:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.traefik.yml up -d
services:
collector:
networks:
- default
- proxy-net
api:
networks:
- default
- proxy-net
web:
networks:
- default
- proxy-net
migrate:
networks:
- default
- proxy-net
networks:
proxy-net:
external: true