Some checks failed
CD Preprod / Unit Tests (${{ matrix.app }}) (backend) (push) Blocked by required conditions
CD Preprod / Unit Tests (${{ matrix.app }}) (frontend) (push) Blocked by required conditions
CD Preprod / Integration Tests (push) Blocked by required conditions
CD Preprod / Build & Push Backend (push) Blocked by required conditions
CD Preprod / Build & Push Frontend (push) Blocked by required conditions
CD Preprod / Deploy to Preprod (push) Blocked by required conditions
CD Preprod / Smoke Tests (push) Blocked by required conditions
CD Preprod / Deployment Summary (push) Blocked by required conditions
CD Preprod / Notify Success (push) Blocked by required conditions
CD Preprod / Notify Failure (push) Blocked by required conditions
CD Preprod / Quality (${{ matrix.app }}) (backend) (push) Has been cancelled
CD Preprod / Quality (${{ matrix.app }}) (frontend) (push) Has been cancelled
Aligns preprod with the complete application codebase (cicd branch). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
116 lines
4.3 KiB
YAML
116 lines
4.3 KiB
YAML
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Xpeditis — Centralized Logging Stack
|
|
#
|
|
# Usage (standalone):
|
|
# docker-compose -f docker-compose.yml -f docker-compose.logging.yml up -d
|
|
#
|
|
# Usage (full dev environment with logging):
|
|
# docker-compose -f docker-compose.dev.yml -f docker-compose.logging.yml up -d
|
|
#
|
|
# Exposed ports:
|
|
# - Grafana: http://localhost:3000 (admin / xpeditis_grafana)
|
|
# - Loki: http://localhost:3100 (internal use only)
|
|
# - Promtail: http://localhost:9080 (internal use only)
|
|
# - log-exporter: http://localhost:3200 (export API)
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
|
|
services:
|
|
# ─── Loki — Log storage & query engine ────────────────────────────────────
|
|
loki:
|
|
image: grafana/loki:3.0.0
|
|
container_name: xpeditis-loki
|
|
restart: unless-stopped
|
|
ports:
|
|
- '3100:3100'
|
|
volumes:
|
|
- ./infra/logging/loki/loki-config.yml:/etc/loki/local-config.yaml:ro
|
|
- loki_data:/loki
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget --quiet --tries=1 --spider http://localhost:3100/ready || exit 1']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- xpeditis-network
|
|
|
|
# ─── Promtail — Docker log collector ──────────────────────────────────────
|
|
promtail:
|
|
image: grafana/promtail:3.0.0
|
|
container_name: xpeditis-promtail
|
|
restart: unless-stopped
|
|
ports:
|
|
- '9080:9080'
|
|
volumes:
|
|
- ./infra/logging/promtail/promtail-config.yml:/etc/promtail/config.yml:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
# Note: /var/lib/docker/containers is not needed with docker_sd_configs (uses Docker API)
|
|
command: -config.file=/etc/promtail/config.yml
|
|
depends_on:
|
|
loki:
|
|
condition: service_healthy
|
|
networks:
|
|
- xpeditis-network
|
|
|
|
# ─── Grafana — Visualization ───────────────────────────────────────────────
|
|
grafana:
|
|
image: grafana/grafana:11.0.0
|
|
container_name: xpeditis-grafana
|
|
restart: unless-stopped
|
|
ports:
|
|
- '3030:3000'
|
|
environment:
|
|
GF_SECURITY_ADMIN_USER: admin
|
|
GF_SECURITY_ADMIN_PASSWORD: xpeditis_grafana
|
|
GF_USERS_ALLOW_SIGN_UP: 'false'
|
|
GF_AUTH_ANONYMOUS_ENABLED: 'false'
|
|
GF_SERVER_ROOT_URL: http://localhost:3030
|
|
# Disable telemetry
|
|
GF_ANALYTICS_REPORTING_ENABLED: 'false'
|
|
GF_ANALYTICS_CHECK_FOR_UPDATES: 'false'
|
|
volumes:
|
|
- ./infra/logging/grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- grafana_data:/var/lib/grafana
|
|
depends_on:
|
|
loki:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget --quiet --tries=1 --spider http://localhost:3000/api/health || exit 1']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- xpeditis-network
|
|
|
|
# ─── log-exporter — REST export API ───────────────────────────────────────
|
|
log-exporter:
|
|
build:
|
|
context: ./apps/log-exporter
|
|
dockerfile: Dockerfile
|
|
container_name: xpeditis-log-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- '3200:3200'
|
|
environment:
|
|
PORT: 3200
|
|
LOKI_URL: http://loki:3100
|
|
# Optional: set LOG_EXPORTER_API_KEY to require x-api-key header
|
|
# LOG_EXPORTER_API_KEY: your-secret-key-here
|
|
depends_on:
|
|
loki:
|
|
condition: service_healthy
|
|
networks:
|
|
- xpeditis-network
|
|
|
|
volumes:
|
|
loki_data:
|
|
driver: local
|
|
grafana_data:
|
|
driver: local
|
|
|
|
networks:
|
|
xpeditis-network:
|
|
name: xpeditis-network
|
|
# Re-uses the network created by docker-compose.yml / docker-compose.dev.yml.
|
|
# If starting this stack alone, the network is created automatically.
|