Files
monlet/deploy/docker-compose.showcase.yml
2026-05-28 14:19:27 +04:00

162 lines
4.6 KiB
YAML

# Showcase / e2e override on top of deploy/docker-compose.yml.
# Usage:
# docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.showcase.yml up -d --build
# Demo agents only — production uses systemd-managed Go binary.
services:
server:
environment:
MONLET_STALE_AFTER_SEC: "20"
MONLET_DEAD_AFTER_SEC: "30"
MONLET_DETECTOR_TICK_SEC: "5"
MONLET_EVENTS_RETENTION_MONTHS: "1"
MONLET_OUTBOX_RETENTION_MAX_ROWS: "1000"
MONLET_NOTIFIER_DEBUG_ENABLED: "true"
MONLET_NOTIFIER_WEBHOOK_ENABLED: "true"
MONLET_NOTIFIER_WEBHOOK_URL: "http://mock-webhook:8080/"
mock-webhook:
image: python:3.14-alpine
command: ["python3", "-u", "/opt/mock_webhook.py"]
volumes:
- ./showcase/mock_webhook.py:/opt/mock_webhook.py:ro
healthcheck:
test: ["CMD-SHELL", "wget -qO- --post-data='{}' http://localhost:8080/ >/dev/null 2>&1 || true"]
interval: 5s
timeout: 3s
retries: 5
agent-mixed:
image: monlet-showcase-agent
hostname: agent-01
build:
context: ..
dockerfile: deploy/docker/agent.Dockerfile
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/mixed.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- mixed_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
ports:
- "9465:9465"
agent-resolve:
image: monlet-showcase-agent
hostname: agent-02
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/resolve.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- resolve_agent_state:/var/lib/monlet-agent
- resolve_state:/state
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
agent-flap:
image: monlet-showcase-agent
hostname: agent-03
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/flap.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- flap_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
agent-timeout:
image: monlet-showcase-agent
hostname: agent-04
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/timeout.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- timeout_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
agent-prometheus-owned:
image: monlet-showcase-agent
hostname: agent-05
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/prometheus_owned.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- prometheus_owned_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
agent-stale:
image: monlet-showcase-agent
hostname: agent-07
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/stale.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- stale_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
agent-dead:
image: monlet-showcase-agent
hostname: agent-08
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/dead.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- dead_agent_state:/var/lib/monlet-agent
depends_on:
server:
condition: service_healthy
agent-mixed:
condition: service_started
# No depends_on:server — starts in parallel so it must spool events until server is ready.
agent-spool-replay:
image: monlet-showcase-agent
hostname: agent-06
environment:
MONLET_CONFIG: /etc/monlet/agent.toml
volumes:
- ./showcase/agents/spool_replay.toml:/etc/monlet/agent.toml:ro
- ./showcase/checks:/opt/monlet/checks:ro
- spool_replay_state:/var/lib/monlet-agent
depends_on:
postgres:
condition: service_healthy
volumes:
mixed_agent_state:
resolve_agent_state:
resolve_state:
flap_agent_state:
timeout_agent_state:
prometheus_owned_agent_state:
stale_agent_state:
dead_agent_state:
spool_replay_state: