Files
ayurishchevandClaude Sonnet 5 cf5c7fa0e8 Add docker-compose for running all components together
control-api was the only component deployable via a bare Dockerfile alone
(no entrypoint/template, no default mountable config), and there was no
compose file wiring the four services' network, healthcheck ordering, or
DB volume together. Adds a base docker-compose.yml plus dev (override,
auto-loaded) and prod overlays, split by Compose profiles matching the
real deployment topology (control-plane/dashboard/prober/validator), a
ready-to-copy mock config for control-api so `docker compose up` works
out of the box, and the repo's first .gitignore for the local env/config
copies developers create from the committed examples.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NeVbMVEiE7XQAkBd7HQgj6
2026-09-13 15:11:30 +03:00

36 lines
1.4 KiB
YAML

# Prod overlay — load explicitly:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.prod up -d --build
#
# No ports: (prod is expected to sit behind a reverse proxy / firewalled
# network) and no depends_on: — on a split deployment (control-api on one
# host, prober/validator-agent on others) control-api's profile is not even
# part of that host's compose invocation, and depends_on on an inactive
# profile is a hard `docker compose config` error. restart: unless-stopped
# is the substitute safety net for the startup-order race (see RUN.txt /
# README): prober and validator-agent exit on a failed one-shot
# registration, so they get restarted until control-api is reachable.
services:
control-api:
restart: unless-stopped
volumes:
- ${CONTROL_API_CONFIG_PATH:-/etc/cloud-ip-validator/UNCONFIGURED-control-api.yaml}:/etc/cloud-ip-validator/control-api.yaml:ro
environment:
OS_AUTH_URL: "${OS_AUTH_URL:-}"
OS_PROJECT_ID: "${OS_PROJECT_ID:-}"
OS_REGION_NAME: "${OS_REGION_NAME:-}"
OS_INTERFACE: "${OS_INTERFACE:-}"
OS_TOKEN: "${OS_TOKEN:-}"
OS_USERNAME: "${OS_USERNAME:-}"
OS_USER_DOMAIN_NAME: "${OS_USER_DOMAIN_NAME:-}"
OS_PASSWORD: "${OS_PASSWORD:-}"
admin-dashboard:
restart: unless-stopped
prober:
restart: unless-stopped
validator-agent:
restart: unless-stopped