Lab7: HTTPS, mTLS, OpenBao, трек 2 PKI на оценку 5
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
+592
@@ -0,0 +1,592 @@
|
||||
name: mtusi-lab7
|
||||
|
||||
x-app-env: &app-env
|
||||
APP_HOST: 0.0.0.0
|
||||
APP_PORT: "8443"
|
||||
HEALTH_HOST: 127.0.0.1
|
||||
HEALTH_PORT: "8081"
|
||||
APP_ENV: ${APP_ENV:-lab}
|
||||
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
|
||||
SESSION_STORE: redis
|
||||
IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400}
|
||||
POOL_MAX: ${POOL_MAX:-10}
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
CACHE_URL_FILE: /run/secrets/cache_url
|
||||
BROKER_URL_FILE: /run/secrets/broker_url
|
||||
S3_ENDPOINT: minio:9000
|
||||
S3_BUCKET: messenger-attachments
|
||||
S3_SECURE: "true"
|
||||
S3_ACCESS_KEY_FILE: /run/secrets/s3_access_key
|
||||
S3_SECRET_KEY_FILE: /run/secrets/s3_secret_key
|
||||
TLS_CA_FILE: /certs/ca.crt
|
||||
TLS_CERT_FILE: /certs/api.crt
|
||||
TLS_KEY_FILE: /certs/private/api.key
|
||||
MTLS_ALLOWED_CLIENTS: lb
|
||||
BROKER_CLIENT_CERT: /certs/api-client.crt
|
||||
BROKER_CLIENT_KEY: /certs/private/api-client.key
|
||||
BAO_ADDR: https://openbao:8200
|
||||
BAO_ROLE_ID_FILE: /run/secrets/bao_api_role_id
|
||||
BAO_SECRET_ID_FILE: /run/secrets/bao_api_secret_id
|
||||
BAO_SECRET_PATH: secret/data/messenger/api
|
||||
OTEL_SERVICE_NAME: messenger-api
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-gateway:4318
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /certs/ca.crt
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /certs/api-client.crt
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /certs/private/api-client.key
|
||||
OTEL_RESOURCE_ATTRIBUTES: deployment.environment.name=lab
|
||||
OTEL_TRACES_SAMPLER_ARG: ${OTEL_TRACES_SAMPLER_ARG:-1.0}
|
||||
SERVICE_VERSION: lab7
|
||||
ARGON2_MEMORY_KIB: ${ARGON2_MEMORY_KIB:-19456}
|
||||
ARGON2_ITERATIONS: ${ARGON2_ITERATIONS:-2}
|
||||
ARGON2_PARALLELISM: ${ARGON2_PARALLELISM:-1}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16.10-bookworm@sha256:38471f330eb885e04de130b768d6db4e10469e2311879c7e5c699f6d2d8a1c74
|
||||
entrypoint: ["/bin/sh", "/init/postgres-entry.sh"]
|
||||
environment:
|
||||
POSTGRES_USER: messenger
|
||||
POSTGRES_DB: messenger
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
- ./scripts/postgres-entry.sh:/init/postgres-entry.sh:ro
|
||||
- ./certs/postgres.crt:/tls/postgres.crt:ro
|
||||
- ./certs/private/postgres.key:/tls/postgres.key:ro
|
||||
- ./certs/ca.crt:/tls/ca.crt:ro
|
||||
secrets:
|
||||
- postgres_password
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U messenger -d messenger"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 15s
|
||||
cpus: "1.00"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
redis:
|
||||
image: redis:7.4.2-bookworm@sha256:fbdbaea47b9ae4ecc2082ecdb4e1cea81e32176ffb1dcf643d422ad07427e5d9
|
||||
entrypoint: ["/bin/sh", "/init/redis-entry.sh"]
|
||||
volumes:
|
||||
- redis-data:/data
|
||||
- ./scripts/redis-entry.sh:/init/redis-entry.sh:ro
|
||||
- ./certs/redis.crt:/tls/redis.crt:ro
|
||||
- ./certs/private/redis.key:/tls/redis.key:ro
|
||||
- ./certs/ca.crt:/tls/ca.crt:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "--tls", "--cacert", "/tls-run/ca.crt", "ping"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 8s
|
||||
cpus: "0.25"
|
||||
mem_limit: 128m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:3.13.7-alpine@sha256:d7af1c87c5f1eda13fcfca06db452bf3aeab6619fc3358b68535c0c02c4e52bc
|
||||
hostname: rabbitmq
|
||||
entrypoint: ["/bin/sh", "/init/rabbit-entry.sh"]
|
||||
volumes:
|
||||
- rabbitmq-data:/var/lib/rabbitmq
|
||||
- ./scripts/rabbit-entry.sh:/init/rabbit-entry.sh:ro
|
||||
- ./certs/rabbitmq.crt:/tls/rabbitmq.crt:ro
|
||||
- ./certs/private/rabbitmq.key:/tls/rabbitmq.key:ro
|
||||
- ./certs/ca.crt:/tls/ca.crt:ro
|
||||
secrets:
|
||||
- rabbit_user
|
||||
- rabbit_password
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 12
|
||||
start_period: 180s
|
||||
cpus: "1.00"
|
||||
mem_limit: 1024m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
minio:
|
||||
image: pgsty/minio@sha256:b6bfe7239bfc83fb90d31612d9704d86039dd714f7904b3f1ad68f211e602372
|
||||
entrypoint: ["/bin/sh", "/init/minio-tls-entry.sh"]
|
||||
environment:
|
||||
MINIO_ROOT_USER_FILE: /run/secrets/minio_root_user
|
||||
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_root_password
|
||||
volumes:
|
||||
- minio-data:/data
|
||||
- ./scripts/minio-tls-entry.sh:/init/minio-tls-entry.sh:ro
|
||||
- ./certs/minio.crt:/tls/minio.crt:ro
|
||||
- ./certs/private/minio.key:/tls/minio.key:ro
|
||||
- ./certs/ca.crt:/tls/ca.crt:ro
|
||||
secrets:
|
||||
- minio_root_user
|
||||
- minio_root_password
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fk", "https://127.0.0.1:9000/minio/health/live"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 10s
|
||||
cpus: "0.50"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
minio-init:
|
||||
image: pgsty/minio@sha256:b6bfe7239bfc83fb90d31612d9704d86039dd714f7904b3f1ad68f211e602372
|
||||
entrypoint: ["/bin/sh", "/init/minio-init.sh"]
|
||||
environment:
|
||||
MC_HOST_local: ""
|
||||
S3_SECURE: "true"
|
||||
volumes:
|
||||
- ./scripts/minio-init.sh:/init/minio-init.sh:ro
|
||||
- ./infra/minio-api-policy.json:/init/policy.json:ro
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
secrets:
|
||||
- minio_root_user
|
||||
- minio_root_password
|
||||
- s3_access_key
|
||||
- s3_secret_key
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
restart: "no"
|
||||
networks:
|
||||
- lab
|
||||
|
||||
openbao:
|
||||
image: openbao/openbao:2.1.0
|
||||
entrypoint: ["/bin/sh", "/init/openbao-entry.sh"]
|
||||
volumes:
|
||||
- ./infra/openbao/openbao.hcl:/openbao/config/openbao.hcl:ro
|
||||
- ./scripts/openbao-entry.sh:/init/openbao-entry.sh:ro
|
||||
- ./certs/openbao.crt:/openbao/tls/openbao.crt:ro
|
||||
- ./certs/private/openbao.key:/openbao/tls/openbao.key:ro
|
||||
- ./certs/ca.crt:/openbao/tls/ca.crt:ro
|
||||
- openbao-data:/openbao/file
|
||||
environment:
|
||||
BAO_ADDR: https://127.0.0.1:8200
|
||||
BAO_CACERT: /openbao/tls-run/ca.crt
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"wget",
|
||||
"--no-check-certificate",
|
||||
"-qO-",
|
||||
"https://127.0.0.1:8200/v1/sys/health?sealedcode=200&uninitcode=200&standbycode=200",
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 10s
|
||||
cpus: "0.50"
|
||||
mem_limit: 256m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
ports:
|
||||
- "127.0.0.1:8200:8200"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
migrate:
|
||||
build: .
|
||||
image: mtusi-lab7-api:local
|
||||
user: "10001:10001"
|
||||
command: ["python", "/app/src/migrate.py"]
|
||||
environment:
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
TLS_CA_FILE: /certs/ca.crt
|
||||
volumes:
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
secrets:
|
||||
- database_url
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
disable: true
|
||||
cpus: "0.50"
|
||||
mem_limit: 256m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
restart: "no"
|
||||
networks:
|
||||
- lab
|
||||
|
||||
api:
|
||||
build: .
|
||||
image: mtusi-lab7-api:local
|
||||
user: "10001:10001"
|
||||
environment:
|
||||
<<: *app-env
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
RECONCILE_GRACE_SECONDS: ${RECONCILE_GRACE_SECONDS:-120}
|
||||
volumes:
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
- ./certs/api.crt:/certs/api.crt:ro
|
||||
- ./certs/private/api.key:/certs/private/api.key:ro
|
||||
- ./certs/api-client.crt:/certs/api-client.crt:ro
|
||||
- ./certs/private/api-client.key:/certs/private/api-client.key:ro
|
||||
secrets:
|
||||
- database_url
|
||||
- cache_url
|
||||
- broker_url
|
||||
- s3_access_key
|
||||
- s3_secret_key
|
||||
- bao_api_role_id
|
||||
- bao_api_secret_id
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
redis:
|
||||
condition: service_healthy
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
openbao:
|
||||
condition: service_healthy
|
||||
otel-gateway:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"python",
|
||||
"-c",
|
||||
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8081/health/ready', timeout=2)",
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
start_period: 45s
|
||||
init: true
|
||||
stop_grace_period: 10s
|
||||
cpus: "0.50"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
deploy:
|
||||
replicas: 2
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
worker:
|
||||
build: .
|
||||
image: mtusi-lab7-api:local
|
||||
user: "10001:10001"
|
||||
command: ["python", "/app/src/worker.py"]
|
||||
environment:
|
||||
DATABASE_URL_FILE: /run/secrets/database_url
|
||||
BROKER_URL_FILE: /run/secrets/broker_url
|
||||
S3_ENDPOINT: minio:9000
|
||||
S3_BUCKET: messenger-attachments
|
||||
S3_SECURE: "true"
|
||||
S3_ACCESS_KEY_FILE: /run/secrets/s3_access_key
|
||||
S3_SECRET_KEY_FILE: /run/secrets/s3_secret_key
|
||||
TLS_CA_FILE: /certs/ca.crt
|
||||
BROKER_CLIENT_CERT: /certs/worker-client.crt
|
||||
BROKER_CLIENT_KEY: /certs/private/worker-client.key
|
||||
BAO_ADDR: https://openbao:8200
|
||||
BAO_ROLE_ID_FILE: /run/secrets/bao_worker_role_id
|
||||
BAO_SECRET_ID_FILE: /run/secrets/bao_worker_secret_id
|
||||
BAO_SECRET_PATH: secret/data/messenger/worker
|
||||
WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-2}
|
||||
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
|
||||
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
|
||||
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
|
||||
OTEL_SERVICE_NAME: messenger-worker
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-gateway:4318
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
|
||||
OTEL_EXPORTER_OTLP_CERTIFICATE: /certs/ca.crt
|
||||
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /certs/worker-client.crt
|
||||
OTEL_EXPORTER_OTLP_CLIENT_KEY: /certs/private/worker-client.key
|
||||
OTEL_RESOURCE_ATTRIBUTES: deployment.environment.name=lab
|
||||
OTEL_TRACES_SAMPLER_ARG: ${OTEL_TRACES_SAMPLER_ARG:-1.0}
|
||||
SERVICE_VERSION: lab7
|
||||
volumes:
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
- ./certs/worker-client.crt:/certs/worker-client.crt:ro
|
||||
- ./certs/private/worker-client.key:/certs/private/worker-client.key:ro
|
||||
secrets:
|
||||
- database_url
|
||||
- broker_url
|
||||
- s3_access_key
|
||||
- s3_secret_key
|
||||
- bao_worker_role_id
|
||||
- bao_worker_secret_id
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
openbao:
|
||||
condition: service_healthy
|
||||
otel-gateway:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
disable: true
|
||||
init: true
|
||||
stop_grace_period: 20s
|
||||
cpus: "1.00"
|
||||
mem_limit: 768m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
lb:
|
||||
image: haproxy:2.8.14@sha256:2344d1efbf7a932c7a3d49b60748c28af81c70fd11fcadd983e2be1f0376a69d
|
||||
volumes:
|
||||
- ./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
- ./certs/ca.crt:/etc/certs/ca.crt:ro
|
||||
- ./certs/private/public.pem:/etc/certs/private/public.pem:ro
|
||||
- ./certs/private/lb.pem:/etc/certs/private/lb.pem:ro
|
||||
ports:
|
||||
- "127.0.0.1:8443:8443"
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
cpus: "0.25"
|
||||
mem_limit: 128m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.114.0@sha256:37fa87091cfaaec7234a27e4e395a40c31c2bfaea97a349a4afef6d9e9681197
|
||||
command: ["--config=/etc/otelcol/config.yaml"]
|
||||
volumes:
|
||||
- ./infra/otel/collector.yaml:/etc/otelcol/config.yaml:ro
|
||||
depends_on:
|
||||
prometheus:
|
||||
condition: service_started
|
||||
loki:
|
||||
condition: service_started
|
||||
tempo:
|
||||
condition: service_started
|
||||
cpus: "0.50"
|
||||
mem_limit: 384m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
otel-gateway:
|
||||
image: nginx:1.27.2-alpine
|
||||
volumes:
|
||||
- ./infra/nginx-otel.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
- ./certs/otel-collector.crt:/certs/otel-collector.crt:ro
|
||||
- ./certs/private/otel-collector.key:/certs/private/otel-collector.key:ro
|
||||
depends_on:
|
||||
- otel-collector
|
||||
cpus: "0.10"
|
||||
mem_limit: 64m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /var/cache/nginx
|
||||
- /var/run
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.54.1@sha256:f6639335d34a77d9d9db382b92eeb7fc00934be8eae81dbc03b31cfe90411a94
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
- --storage.tsdb.retention.time=48h
|
||||
- --web.enable-remote-write-receiver
|
||||
- --web.enable-lifecycle
|
||||
volumes:
|
||||
- ./infra/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./infra/prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
|
||||
- prometheus-data:/prometheus
|
||||
ports:
|
||||
- "127.0.0.1:9090:9090"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:9090/-/ready"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 10s
|
||||
cpus: "0.50"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
loki:
|
||||
image: grafana/loki:3.2.1@sha256:09a53b4a4ff81ffcd8f13886df19d33fac7a8d3aaf952e3c7e66cbade5b2fc31
|
||||
command: ["-config.file=/etc/loki/loki.yaml"]
|
||||
volumes:
|
||||
- ./infra/loki/loki.yaml:/etc/loki/loki.yaml:ro
|
||||
- loki-data:/loki
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3100/ready"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 15s
|
||||
cpus: "0.50"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
tempo:
|
||||
image: grafana/tempo:2.6.1@sha256:ef4384fce6e8ad22b95b243d8fc165628cda655376fd50e7850536ad89d71d50
|
||||
command: ["-config.file=/etc/tempo/tempo.yaml"]
|
||||
volumes:
|
||||
- ./infra/tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
|
||||
- tempo-data:/var/tempo
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3200/ready"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 15s
|
||||
cpus: "0.50"
|
||||
mem_limit: 512m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:11.2.2@sha256:d5133220d770aba5cb655147b619fa8770b90f41d8489a821d33b1cd34d16f89
|
||||
environment:
|
||||
GF_SECURITY_ADMIN_USER: admin
|
||||
GF_SECURITY_ADMIN_PASSWORD: labadmin
|
||||
GF_USERS_ALLOW_SIGN_UP: "false"
|
||||
GF_AUTH_ANONYMOUS_ENABLED: "true"
|
||||
GF_AUTH_ANONYMOUS_ORG_ROLE: Viewer
|
||||
GF_SERVER_HTTP_PORT: "3000"
|
||||
GF_PATHS_PROVISIONING: /etc/grafana/provisioning
|
||||
volumes:
|
||||
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- ./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
- grafana-data:/var/lib/grafana
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
depends_on:
|
||||
prometheus:
|
||||
condition: service_started
|
||||
loki:
|
||||
condition: service_started
|
||||
tempo:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/api/health"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 12
|
||||
start_period: 20s
|
||||
cpus: "0.50"
|
||||
mem_limit: 384m
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lab
|
||||
|
||||
networks:
|
||||
lab:
|
||||
name: mtusi-lab7-net
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
redis-data:
|
||||
minio-data:
|
||||
rabbitmq-data:
|
||||
prometheus-data:
|
||||
loki-data:
|
||||
tempo-data:
|
||||
grafana-data:
|
||||
openbao-data:
|
||||
|
||||
secrets:
|
||||
database_url:
|
||||
file: ./secrets/database_url
|
||||
cache_url:
|
||||
file: ./secrets/cache_url
|
||||
postgres_password:
|
||||
file: ./secrets/postgres_password
|
||||
minio_root_user:
|
||||
file: ./secrets/minio_root_user
|
||||
minio_root_password:
|
||||
file: ./secrets/minio_root_password
|
||||
s3_access_key:
|
||||
file: ./secrets/s3_access_key
|
||||
s3_secret_key:
|
||||
file: ./secrets/s3_secret_key
|
||||
rabbit_user:
|
||||
file: ./secrets/rabbit_user
|
||||
rabbit_password:
|
||||
file: ./secrets/rabbit_password
|
||||
broker_url:
|
||||
file: ./secrets/broker_url
|
||||
bao_api_role_id:
|
||||
file: ./secrets/bao_api_role_id
|
||||
bao_api_secret_id:
|
||||
file: ./secrets/bao_api_secret_id
|
||||
bao_worker_role_id:
|
||||
file: ./secrets/bao_worker_role_id
|
||||
bao_worker_secret_id:
|
||||
file: ./secrets/bao_worker_secret_id
|
||||
Reference in New Issue
Block a user