Files
meshcore-hub/docker-compose.prod.yml
Louis King 3593d14878 feat(api): make Redis a required cache dependency
Redis becomes mandatory infrastructure (PostgreSQL-parity): the
REDIS_ENABLED flag, NullCache backend, and every conditional caching
code path are removed. /health/ready reports not_ready (503) when
Redis is unreachable and cached endpoints return 503 instead of
silently degrading; invalidation helpers never raise after a
committed write.

The bundled redis container joins the core profile only via
docker-compose.dev.yml (production points REDIS_* at an external
instance, same no-shadowing pattern as postgres), the backend suite
runs against real Redis (test-redis on 127.0.0.1:55433, CI redis:8
service container, per-xdist-worker key prefixes), and operator docs
describe the required-dependency setup (upgrading.md gains the
v0.20.0 section).
2026-08-30 21:51:51 +01:00

50 lines
1.4 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.
# The same applies to the bundled 'redis' service (a required dependency of
# the API): point REDIS_* at your shared/external instance, or opt into the
# bundled one explicitly with `--profile cache` (or `--profile all`).
#
# 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