mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-10-31 04:02:03 +01:00
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)
54 lines
1.5 KiB
YAML
54 lines
1.5 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
|
|
|
|
redis:
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|