add level 3 and 4
This commit is contained in:
+58
-3
@@ -4,7 +4,9 @@ x-api: &api
|
||||
environment:
|
||||
APP_HOST: 0.0.0.0
|
||||
APP_PORT: 8080
|
||||
APP_ENV: lab5
|
||||
APP_ENV: lab
|
||||
OTEL_ENABLED: "1"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400}
|
||||
@@ -206,7 +208,9 @@ services:
|
||||
context: .
|
||||
command: ["/app/.venv/bin/python", "-m", "src.worker"]
|
||||
environment:
|
||||
APP_ENV: lab5
|
||||
APP_ENV: lab
|
||||
OTEL_ENABLED: "1"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
|
||||
S3_ENDPOINT: http://s3:8333
|
||||
@@ -243,7 +247,9 @@ services:
|
||||
context: .
|
||||
command: ["/app/.venv/bin/python", "-m", "src.outbox"]
|
||||
environment:
|
||||
APP_ENV: lab5
|
||||
APP_ENV: lab
|
||||
OTEL_ENABLED: "1"
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
|
||||
BROKER_URL_FILE: /run/secrets/broker_url
|
||||
@@ -283,7 +289,52 @@ services:
|
||||
cpus: "0.25"
|
||||
memory: 128M
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.120.0
|
||||
command: ["--config=/etc/otelcol/config.yaml"]
|
||||
volumes:
|
||||
- ./infra/otel/collector.yaml:/etc/otelcol/config.yaml:ro
|
||||
mem_limit: 256m
|
||||
restart: unless-stopped
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.2.1
|
||||
command: ["--config.file=/etc/prometheus/prometheus.yaml", "--storage.tsdb.path=/prometheus", "--storage.tsdb.retention.time=7d"]
|
||||
volumes:
|
||||
- ./infra/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
|
||||
- ./infra/prometheus/alerts.yaml:/etc/prometheus/alerts.yaml:ro
|
||||
- prometheus_data:/prometheus
|
||||
restart: unless-stopped
|
||||
loki:
|
||||
image: grafana/loki:3.4.2
|
||||
command: ["-config.file=/etc/loki/loki.yaml"]
|
||||
volumes:
|
||||
- ./infra/loki/loki.yaml:/etc/loki/loki.yaml:ro
|
||||
- loki_data:/loki
|
||||
restart: unless-stopped
|
||||
tempo:
|
||||
image: grafana/tempo:2.7.1
|
||||
command: ["-config.file=/etc/tempo/tempo.yaml"]
|
||||
volumes:
|
||||
- ./infra/tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
|
||||
- tempo_data:/var/tempo
|
||||
restart: unless-stopped
|
||||
grafana:
|
||||
image: grafana/grafana:11.5.2
|
||||
ports: ["127.0.0.1:3000:3000"]
|
||||
environment:
|
||||
GF_SECURITY_ADMIN_USER: admin
|
||||
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_password
|
||||
GF_USERS_ALLOW_SIGN_UP: "false"
|
||||
secrets: [grafana_password]
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
restart: unless-stopped
|
||||
|
||||
secrets:
|
||||
grafana_password:
|
||||
file: ./secrets/grafana_password
|
||||
s3_config:
|
||||
file: ./secrets/s3.json
|
||||
s3_admin_key:
|
||||
@@ -306,6 +357,10 @@ secrets:
|
||||
file: ./secrets/broker_url
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
loki_data:
|
||||
tempo_data:
|
||||
grafana_data:
|
||||
s3_data:
|
||||
postgres_data:
|
||||
rabbitmq_data:
|
||||
|
||||
Reference in New Issue
Block a user