services: redis: image: redis:7-alpine container_name: rampart-redis # Redis is reachable only from this Compose network and the loopback # interface; the password is mandatory so an unset variable aborts startup. ports: - "127.0.0.1:6379:6379" environment: REDIS_PASSWORD: "${REDIS_PASSWORD:?REDIS_PASSWORD must be set (see docs/deployment.md)}" command: redis-server --requirepass "${REDIS_PASSWORD:?REDIS_PASSWORD must be set (see docs/deployment.md)}" --appendonly yes volumes: - redis-data:/data healthcheck: test: ["CMD-SHELL", "redis-cli -a \"$$REDIS_PASSWORD\" --no-auth-warning ping | grep -q PONG"] interval: 5s timeout: 3s retries: 5 restart: unless-stopped clickhouse: image: clickhouse/clickhouse-server:24-alpine container_name: rampart-clickhouse # ClickHouse has no authentication here: bind it to loopback only and keep # container-to-container traffic on the Compose network (service name). ports: - "127.0.0.1:8123:8123" # HTTP - "127.0.0.1:9000:9000" # Native TCP volumes: - clickhouse-data:/var/lib/clickhouse - ./deploy/clickhouse/schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8123/ping"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped grafana: image: grafana/grafana:latest container_name: rampart-grafana ports: - "127.0.0.1:3000:3000" environment: - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:?GRAFANA_PASSWORD must be set (see docs/deployment.md)} - GF_INSTALL_PLUGINS=grafana-clickhouse-datasource volumes: - grafana-data:/var/lib/grafana - ./deploy/grafana/datasources:/etc/grafana/provisioning/datasources:ro - ./deploy/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro depends_on: - clickhouse restart: unless-stopped volumes: redis-data: clickhouse-data: grafana-data: