643 lines
20 KiB
YAML
643 lines
20 KiB
YAML
x-api: &api
|
|
build:
|
|
context: .
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
command: ["/app/.venv/bin/python", "-m", "src.bao_entrypoint", "/app/.venv/bin/python", "-m", "src.main"]
|
|
environment:
|
|
APP_HOST: 127.0.0.1
|
|
APP_PORT: 8080
|
|
APP_ENV: lab
|
|
OTEL_ENABLED: "1"
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
|
|
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/secrets/ca_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/secrets/otel_api_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/secrets/otel_api_cert
|
|
DATABASE_CA_FILE: /run/secrets/ca_cert
|
|
BROKER_CA_FILE: /run/secrets/ca_cert
|
|
BAO_ADDR: https://openbao:8200
|
|
BAO_CACERT: /run/secrets/ca_cert
|
|
BAO_CLIENT_CERT: /run/secrets/bao_api_cert
|
|
BAO_SERVICE_ROLE: api
|
|
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
|
IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400}
|
|
S3_ENDPOINT: https://s3:8333
|
|
AWS_CA_BUNDLE: /run/secrets/ca_cert
|
|
S3_BUCKET: messenger-attachments
|
|
MAX_UPLOAD_BYTES: "10485760"
|
|
MAX_IMAGE_PIXELS: "40000000"
|
|
UPLOAD_CONCURRENCY: "1"
|
|
UPLOAD_TIMEOUT_SECONDS: "30"
|
|
UPLOAD_FAULT_AFTER_S3_PUT: ${UPLOAD_FAULT_AFTER_S3_PUT:-0}
|
|
OUTBOX_FAULT_AFTER_COMMIT: ${OUTBOX_FAULT_AFTER_COMMIT:-0}
|
|
MAX_PENDING_JOBS: ${MAX_PENDING_JOBS:-100}
|
|
secrets:
|
|
- ca_cert
|
|
- bao_api_cert
|
|
- otel_api_cert
|
|
depends_on:
|
|
openbao:
|
|
condition: service_started
|
|
s3-init:
|
|
condition: service_completed_successfully
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
db-provision:
|
|
condition: service_completed_successfully
|
|
broker:
|
|
condition: service_healthy
|
|
broker-tcp:
|
|
condition: service_started
|
|
stop_grace_period: 10s
|
|
healthcheck:
|
|
test: ["CMD", "/app/.venv/bin/python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=2).read()"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 10s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.50"
|
|
memory: 512M
|
|
|
|
services:
|
|
openbao:
|
|
image: openbao/openbao:2.3.2
|
|
user: "0:0"
|
|
entrypoint: ["bao"]
|
|
command: ["server", "-config=/bao/config/openbao.hcl"]
|
|
environment:
|
|
BAO_ADDR: https://openbao:8200
|
|
BAO_CACERT: /run/secrets/ca.crt
|
|
ports:
|
|
- "127.0.0.1:${BAO_HOST_PORT:-18200}:8200"
|
|
volumes:
|
|
- ./infra/openbao/openbao.hcl:/bao/config/openbao.hcl:ro
|
|
- ./secrets/openbao.pem:/run/secrets/openbao.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
- openbao_data:/bao/file
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
mem_limit: 256m
|
|
cpus: "0.50"
|
|
|
|
broker:
|
|
image: rabbitmq:4.1.2-alpine
|
|
hostname: broker
|
|
extra_hosts: ["broker:127.0.0.1"]
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: messenger
|
|
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-kernel inet_dist_use_interface {127,0,0,1}"
|
|
ERL_EPMD_ADDRESS: 127.0.0.1
|
|
entrypoint: ["/bin/sh", "/usr/local/bin/rabbitmq-secret-entrypoint.sh"]
|
|
command: ["rabbitmq-server"]
|
|
secrets:
|
|
- rabbitmq_password
|
|
- broker_tls
|
|
- broker_api_password_hash
|
|
- broker_worker_password_hash
|
|
- broker_outbox_password_hash
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
- ./infra/rabbitmq-secret-entrypoint.sh:/usr/local/bin/rabbitmq-secret-entrypoint.sh:ro
|
|
- ./infra/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "test -f /tmp/rabbitmq-tls/provisioned && rabbitmq-diagnostics -q ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
start_period: 10s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.50"
|
|
memory: 256M
|
|
|
|
broker-tcp:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:broker
|
|
depends_on:
|
|
broker:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./infra/broker-tcp.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
|
|
s3:
|
|
image: chrislusf/seaweedfs:4.17@sha256:186de7ef977a20343ee9a5544073f081976a29e2d29ecf8379891e7bf177fbe9
|
|
command: ["server", "-dir=/data", "-ip=127.0.0.1", "-ip.bind=127.0.0.1", "-s3", "-s3.port=18333", "-s3.config=/run/secrets/s3_config", "-s3.cert.file=/run/secrets/s3_tls", "-s3.key.file=/run/secrets/s3_tls", "-master.volumeSizeLimitMB=128", "-volume.max=64", "-s3.port.iceberg=0", "-filer.exposeDirectoryData=false"]
|
|
secrets:
|
|
- s3_config
|
|
- s3_tls
|
|
volumes:
|
|
- s3_data:/data
|
|
- ./infra/filer.toml:/etc/seaweedfs/filer.toml:ro
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:9333/cluster/status"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 20
|
|
start_period: 15s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 512M
|
|
|
|
s3-tcp:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:s3
|
|
depends_on:
|
|
s3:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./infra/s3-tcp.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/s3.pem:/run/secrets/server.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
- ./secrets/s3_admin_acl:/run/secrets/admin_acl:ro
|
|
- ./secrets/s3_api_acl:/run/secrets/api_acl:ro
|
|
- ./secrets/s3_worker_acl:/run/secrets/worker_acl:ro
|
|
- ./secrets/s3_reconcile_acl:/run/secrets/reconcile_acl:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
|
|
s3-init:
|
|
build:
|
|
context: .
|
|
command: ["/app/.venv/bin/python", "-m", "src.bootstrap_s3"]
|
|
environment:
|
|
S3_ENDPOINT: https://s3:8333
|
|
AWS_CA_BUNDLE: /run/secrets/ca_cert
|
|
S3_BUCKET: messenger-attachments
|
|
S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_admin_key
|
|
S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_admin_secret
|
|
secrets:
|
|
- ca_cert
|
|
- s3_admin_key
|
|
- s3_admin_secret
|
|
depends_on:
|
|
s3-tcp:
|
|
condition: service_started
|
|
restart: "no"
|
|
mem_limit: 256m
|
|
cpus: "0.50"
|
|
|
|
postgres:
|
|
image: postgres:17.6-alpine
|
|
entrypoint: ["/bin/sh", "/usr/local/bin/postgres-tls-entrypoint.sh"]
|
|
command: ["postgres", "-c", "track_commit_timestamp=on", "-c", "ssl=on", "-c", "ssl_cert_file=/tmp/postgres-tls/server.pem", "-c", "ssl_key_file=/tmp/postgres-tls/server.pem", "-c", "hba_file=/etc/postgresql/pg_hba.conf"]
|
|
environment:
|
|
POSTGRES_DB: messenger
|
|
POSTGRES_USER: messenger
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
|
secrets:
|
|
- postgres_password
|
|
- postgres_tls
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./infra/postgres-tls-entrypoint.sh:/usr/local/bin/postgres-tls-entrypoint.sh:ro
|
|
- ./infra/postgres-pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U messenger -d messenger"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.75"
|
|
memory: 512M
|
|
|
|
migrate:
|
|
build:
|
|
context: .
|
|
command: ["/app/.venv/bin/python", "-m", "src.migrate"]
|
|
environment:
|
|
DATABASE_URL_FILE: /run/secrets/database_url
|
|
DATABASE_CA_FILE: /run/secrets/ca_cert
|
|
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
|
|
secrets:
|
|
- ca_cert
|
|
- database_url
|
|
- cursor_secret
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.25"
|
|
memory: 128M
|
|
|
|
db-provision:
|
|
build:
|
|
context: .
|
|
command: ["/app/.venv/bin/python", "-m", "src.provision_db_roles"]
|
|
secrets:
|
|
- database_url
|
|
- database_api_password
|
|
- database_worker_password
|
|
- database_outbox_password
|
|
- database_reconcile_password
|
|
- ca_cert
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
restart: "no"
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
|
|
reconcile:
|
|
healthcheck:
|
|
disable: true
|
|
build:
|
|
context: .
|
|
entrypoint: ["/app/.venv/bin/python", "-m", "src.reconcile"]
|
|
command: ["--apply", "--loop"]
|
|
restart: unless-stopped
|
|
environment:
|
|
DATABASE_URL_FILE: /run/secrets/database_reconcile_url
|
|
DATABASE_CA_FILE: /run/secrets/ca_cert
|
|
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
|
|
S3_ENDPOINT: https://s3:8333
|
|
AWS_CA_BUNDLE: /run/secrets/ca_cert
|
|
S3_BUCKET: messenger-attachments
|
|
S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_reconcile_access_key_id
|
|
S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_reconcile_secret_access_key
|
|
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
|
|
secrets:
|
|
- ca_cert
|
|
- database_reconcile_url
|
|
- cursor_secret
|
|
- s3_reconcile_access_key_id
|
|
- s3_reconcile_secret_access_key
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
s3:
|
|
condition: service_healthy
|
|
s3-tcp:
|
|
condition: service_started
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.25"
|
|
memory: 128M
|
|
|
|
api-a:
|
|
<<: *api
|
|
|
|
api-b:
|
|
<<: *api
|
|
|
|
api-a-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:api-a
|
|
depends_on:
|
|
api-a:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./infra/api-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/api-a.pem:/run/secrets/api.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
|
|
api-b-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:api-b
|
|
depends_on:
|
|
api-b:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./infra/api-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/api-b.pem:/run/secrets/api.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
|
|
worker:
|
|
restart: unless-stopped
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
healthcheck:
|
|
test: ["CMD", "/app/.venv/bin/python", "-c", "import time,pathlib; assert time.time()-float(pathlib.Path('/tmp/worker-heartbeat').read_text()) < 15"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "2.0"
|
|
memory: 4G
|
|
build:
|
|
context: .
|
|
command: ["/app/.venv/bin/python", "-m", "src.bao_entrypoint", "/app/.venv/bin/python", "-m", "src.worker"]
|
|
environment:
|
|
APP_ENV: lab
|
|
OTEL_ENABLED: "1"
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
|
|
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/secrets/ca_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/secrets/otel_worker_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/secrets/otel_worker_cert
|
|
DATABASE_CA_FILE: /run/secrets/ca_cert
|
|
BROKER_CA_FILE: /run/secrets/ca_cert
|
|
BAO_ADDR: https://openbao:8200
|
|
BAO_CACERT: /run/secrets/ca_cert
|
|
BAO_CLIENT_CERT: /run/secrets/bao_worker_cert
|
|
BAO_SERVICE_ROLE: worker
|
|
S3_ENDPOINT: https://s3:8333
|
|
AWS_CA_BUNDLE: /run/secrets/ca_cert
|
|
S3_BUCKET: messenger-attachments
|
|
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-2}
|
|
WORKER_FAULT_AFTER_S3_PUT: ${WORKER_FAULT_AFTER_S3_PUT:-0}
|
|
RENDER_MEMORY_MB: ${RENDER_MEMORY_MB:-768}
|
|
WORKER_PREFETCH: ${WORKER_PREFETCH:-2}
|
|
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
|
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
|
|
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
|
|
secrets:
|
|
- ca_cert
|
|
- bao_worker_cert
|
|
- otel_worker_cert
|
|
depends_on:
|
|
openbao:
|
|
condition: service_started
|
|
db-provision:
|
|
condition: service_completed_successfully
|
|
s3-init:
|
|
condition: service_completed_successfully
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
broker:
|
|
condition: service_healthy
|
|
broker-tcp:
|
|
condition: service_started
|
|
stop_grace_period: 30s
|
|
|
|
outbox:
|
|
mem_limit: 256m
|
|
cpus: "0.50"
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
healthcheck:
|
|
disable: true
|
|
build:
|
|
context: .
|
|
command: ["/app/.venv/bin/python", "-m", "src.outbox"]
|
|
environment:
|
|
APP_ENV: lab
|
|
OTEL_ENABLED: "1"
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
|
|
OTEL_EXPORTER_OTLP_CERTIFICATE: /run/secrets/ca_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /run/secrets/otel_outbox_cert
|
|
OTEL_EXPORTER_OTLP_CLIENT_KEY: /run/secrets/otel_outbox_cert
|
|
DATABASE_URL_FILE: /run/secrets/database_outbox_url
|
|
DATABASE_CA_FILE: /run/secrets/ca_cert
|
|
CURSOR_SECRET_FILE: /run/secrets/cursor_secret
|
|
BROKER_URL_FILE: /run/secrets/broker_outbox_url
|
|
BROKER_CA_FILE: /run/secrets/ca_cert
|
|
OUTBOX_DISPATCH_INTERVAL_SECONDS: "1"
|
|
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
|
secrets:
|
|
- ca_cert
|
|
- database_outbox_url
|
|
- cursor_secret
|
|
- broker_outbox_url
|
|
- otel_outbox_cert
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
broker:
|
|
condition: service_healthy
|
|
broker-tcp:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
|
|
load_balancer:
|
|
image: haproxy:3.0.11-alpine
|
|
ports:
|
|
- "127.0.0.1:${PUBLIC_HTTPS_PORT:-8443}:8443"
|
|
volumes:
|
|
- ./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/ingress.pem:/run/secrets/ingress.pem:ro
|
|
- ./secrets/lb.pem:/run/secrets/lb.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
depends_on:
|
|
api-a:
|
|
condition: service_healthy
|
|
api-b:
|
|
condition: service_healthy
|
|
api-a-tls:
|
|
condition: service_started
|
|
api-b-tls:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1:8404/health/ready"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
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
|
|
secrets: [ca_cert, telemetry_collector_cert]
|
|
mem_limit: 256m
|
|
cpus: "0.50"
|
|
restart: unless-stopped
|
|
otel-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:otel-collector
|
|
depends_on: [otel-collector]
|
|
volumes:
|
|
- ./infra/otel-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/otel-collector.pem:/run/secrets/server.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
prometheus:
|
|
image: prom/prometheus:v3.2.1
|
|
mem_limit: 512m
|
|
cpus: "0.50"
|
|
command: ["--config.file=/etc/prometheus/prometheus.yaml", "--web.listen-address=127.0.0.1:19090", "--storage.tsdb.path=/prometheus", "--storage.tsdb.retention.time=7d"]
|
|
secrets: [ca_cert, telemetry_prometheus_cert]
|
|
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
|
|
prometheus-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:prometheus
|
|
depends_on: [prometheus]
|
|
volumes:
|
|
- ./infra/prometheus-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/prometheus.pem:/run/secrets/server.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
loki:
|
|
image: grafana/loki:3.4.2
|
|
mem_limit: 512m
|
|
cpus: "0.50"
|
|
command: ["-config.file=/etc/loki/loki.yaml"]
|
|
volumes:
|
|
- ./infra/loki/loki.yaml:/etc/loki/loki.yaml:ro
|
|
- loki_data:/loki
|
|
restart: unless-stopped
|
|
loki-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:loki
|
|
depends_on: [loki]
|
|
volumes:
|
|
- ./infra/loki-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/loki.pem:/run/secrets/server.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
tempo:
|
|
image: grafana/tempo:2.7.1
|
|
mem_limit: 512m
|
|
cpus: "0.50"
|
|
command: ["-config.file=/etc/tempo/tempo.yaml"]
|
|
volumes:
|
|
- ./infra/tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
|
|
- tempo_data:/var/tempo
|
|
restart: unless-stopped
|
|
tempo-tls:
|
|
image: haproxy:3.0.11-alpine
|
|
network_mode: service:tempo
|
|
depends_on: [tempo]
|
|
volumes:
|
|
- ./infra/tempo-tls.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
- ./secrets/tempo.pem:/run/secrets/server.pem:ro
|
|
- ./secrets/ca.crt:/run/secrets/ca.crt:ro
|
|
restart: unless-stopped
|
|
mem_limit: 128m
|
|
cpus: "0.25"
|
|
grafana:
|
|
image: grafana/grafana:11.5.2
|
|
mem_limit: 512m
|
|
cpus: "0.50"
|
|
ports: ["127.0.0.1:${GRAFANA_HOST_PORT:-3000}:3000"]
|
|
environment:
|
|
GF_SECURITY_ADMIN_USER: admin
|
|
GF_SECURITY_ADMIN_PASSWORD__FILE: /run/secrets/grafana_password
|
|
GF_USERS_ALLOW_SIGN_UP: "false"
|
|
GF_SERVER_PROTOCOL: https
|
|
GF_SERVER_CERT_FILE: /run/secrets/grafana_tls
|
|
GF_SERVER_CERT_KEY: /run/secrets/grafana_tls
|
|
entrypoint: ["/bin/sh", "/etc/grafana/lab-entrypoint.sh"]
|
|
secrets: [grafana_password, grafana_tls, ca_cert, telemetry_grafana_cert]
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
- ./infra/grafana-entrypoint.sh:/etc/grafana/lab-entrypoint.sh:ro
|
|
restart: unless-stopped
|
|
|
|
secrets:
|
|
database_outbox_password:
|
|
file: ./secrets/database_outbox_password
|
|
database_reconcile_password:
|
|
file: ./secrets/database_reconcile_password
|
|
database_outbox_url:
|
|
file: ./secrets/database_outbox_url
|
|
database_reconcile_url:
|
|
file: ./secrets/database_reconcile_url
|
|
s3_reconcile_access_key_id:
|
|
file: ./secrets/s3_reconcile_access_key_id
|
|
s3_reconcile_secret_access_key:
|
|
file: ./secrets/s3_reconcile_secret_access_key
|
|
telemetry_grafana_cert:
|
|
file: ./secrets/telemetry-grafana.pem
|
|
telemetry_collector_cert:
|
|
file: ./secrets/telemetry-collector.pem
|
|
telemetry_prometheus_cert:
|
|
file: ./secrets/telemetry-prometheus.pem
|
|
grafana_tls:
|
|
file: ./secrets/grafana.pem
|
|
otel_api_cert:
|
|
file: ./secrets/otel-api.pem
|
|
otel_worker_cert:
|
|
file: ./secrets/otel-worker.pem
|
|
otel_outbox_cert:
|
|
file: ./secrets/otel-outbox.pem
|
|
database_api_password:
|
|
file: ./secrets/database_api_password
|
|
database_worker_password:
|
|
file: ./secrets/database_worker_password
|
|
broker_api_password_hash:
|
|
file: ./secrets/broker_api_password_hash
|
|
broker_worker_password_hash:
|
|
file: ./secrets/broker_worker_password_hash
|
|
broker_outbox_password_hash:
|
|
file: ./secrets/broker_outbox_password_hash
|
|
broker_outbox_url:
|
|
file: ./secrets/broker_outbox_url
|
|
broker_tls:
|
|
file: ./secrets/broker.pem
|
|
broker_tls_url:
|
|
file: ./secrets/broker_tls_url
|
|
s3_tls:
|
|
file: ./secrets/s3.pem
|
|
bao_api_cert:
|
|
file: ./secrets/bao-api.pem
|
|
bao_worker_cert:
|
|
file: ./secrets/bao-worker.pem
|
|
ca_cert:
|
|
file: ./secrets/ca.crt
|
|
postgres_tls:
|
|
file: ./secrets/postgres.pem
|
|
grafana_password:
|
|
file: ./secrets/grafana_password
|
|
s3_config:
|
|
file: ./secrets/s3.json
|
|
s3_admin_key:
|
|
file: ./secrets/s3_admin_key
|
|
s3_admin_secret:
|
|
file: ./secrets/s3_admin_secret
|
|
s3_access_key_id:
|
|
file: ./secrets/s3_access_key_id
|
|
s3_secret_access_key:
|
|
file: ./secrets/s3_secret_access_key
|
|
postgres_password:
|
|
file: ./secrets/postgres_password
|
|
database_url:
|
|
file: ./secrets/database_url
|
|
cursor_secret:
|
|
file: ./secrets/cursor_secret
|
|
rabbitmq_password:
|
|
file: ./secrets/rabbitmq_password
|
|
broker_url:
|
|
file: ./secrets/broker_url
|
|
|
|
volumes:
|
|
openbao_data:
|
|
prometheus_data:
|
|
loki_data:
|
|
tempo_data:
|
|
grafana_data:
|
|
s3_data:
|
|
postgres_data:
|
|
rabbitmq_data:
|