mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-10-30 19:52:03 +01:00
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).
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
# MeshCore Hub - Development Docker Compose Override
|
|
#
|
|
# Exposes service ports for local development and testing.
|
|
# NOT intended for production use — use docker-compose.prod.yml instead.
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
|
|
|
|
services:
|
|
# Hub services (collector/api/web/migrate/seed) build from local source and
|
|
# never pull the published image in development (pull_policy: build), so
|
|
# `make build` + `make up` cannot clobber a local build with a registry pull.
|
|
collector:
|
|
pull_policy: build
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
mqtt:
|
|
condition: service_healthy
|
|
|
|
mqtt:
|
|
ports:
|
|
- "${MQTT_PORT:-1883}:${MQTT_PORT:-1883}"
|
|
|
|
api:
|
|
pull_policy: build
|
|
ports:
|
|
- "${API_PORT:-8000}:8000"
|
|
|
|
web:
|
|
pull_policy: build
|
|
ports:
|
|
- "${WEB_PORT:-8080}:8080"
|
|
|
|
migrate:
|
|
pull_policy: build
|
|
|
|
# Bundled dev database: unions 'core' into the base [all, postgres] profile
|
|
# list (profiles merge across files), so the documented dev workflow
|
|
# (`--profile core`, `make up`) still starts Postgres for zero-effort setup.
|
|
# Production uses docker-compose.prod.yml instead, which leaves 'core' out —
|
|
# the bundled container never starts there to shadow a shared instance named
|
|
# 'postgres' on the same network.
|
|
postgres:
|
|
profiles:
|
|
- core
|
|
|
|
seed:
|
|
pull_policy: build
|
|
|
|
# Bundled dev Redis: same 'core' profile-union as postgres — Redis is
|
|
# required infrastructure, so the documented dev workflow (`--profile
|
|
# core`, `make up`) starts it for zero-effort setup. Production uses
|
|
# docker-compose.prod.yml, which leaves 'core' out so the bundled
|
|
# container never shadows a shared instance named 'redis' on the network.
|
|
redis:
|
|
profiles:
|
|
- core
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|