--- name: mtusi-lab7-kraykin services: broker: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: broker volumes: - "./certs/private/broker:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/broker.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 cache: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: cache volumes: - "./certs/private/cache:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/cache.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 s3: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: s3 volumes: - "./certs/private/s3:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/s3.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 collector: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: collector volumes: - "./certs/private/collector:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/collector.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 prometheus: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: prometheus volumes: - "./certs/private/prometheus:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/prometheus.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 loki: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: loki volumes: - "./certs/private/loki:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/loki.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 tempo: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: tempo volumes: - "./certs/private/tempo:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/tempo.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 grafana: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - gateway - "/config/gateway.json" environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: grafana volumes: - "./certs/private/grafana:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./infra/tls/grafana.json:/config/gateway.json:ro" healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 ports: - 127.0.0.1:${GRAFANA_PORT:-3007}:3000 postgres: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 2 mem_limit: 512m logging: driver: json-file options: max-size: 10m max-file: '3' image: postgres:17.6-alpine entrypoint: - "/bin/sh" - "/config/postgres-start.sh" environment: POSTGRES_DB: messenger POSTGRES_USER: messenger POSTGRES_PASSWORD_FILE: "/run/secrets/postgres_password" secrets: - postgres_password volumes: - postgres_data:/var/lib/postgresql/data - "./infra/postgres-start.sh:/config/postgres-start.sh:ro" - "./infra/pg_hba.conf:/config/pg_hba.conf:ro" - "./certs/private/postgres:/run/tls:ro" tmpfs: - "/tmp:rw,nosuid,noexec,size=16m" - "/var/run/postgresql:rw,size=16m" cap_add: - CHOWN - FOWNER - DAC_OVERRIDE - SETGID - SETUID healthcheck: test: - CMD-SHELL - pg_isready -U messenger -d messenger interval: 1s timeout: 2s retries: 30 read_only: true broker-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: valkey/valkey:8.1.3-alpine network_mode: service:broker command: - valkey-server - "/run/secrets/broker_config" secrets: - broker_config depends_on: broker: condition: service_started volumes: - broker_data:/data read_only: true tmpfs: - "/tmp:rw,size=16m" user: 999:1000 cache-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: valkey/valkey:8.1.3-alpine network_mode: service:cache command: - valkey-server - "/run/secrets/valkey_config" secrets: - valkey_config depends_on: cache: condition: service_started volumes: [] read_only: true tmpfs: - "/tmp:rw,size=16m" user: 999:1000 s3-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 1 mem_limit: 512m logging: driver: json-file options: max-size: 10m max-file: '3' image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z network_mode: service:s3 command: - server - "/data" - "--address" - 127.0.0.1:9001 - "--console-address" - 127.0.0.1:9002 environment: MINIO_ROOT_USER_FILE: "/run/secrets/s3_root_user" MINIO_ROOT_PASSWORD_FILE: "/run/secrets/s3_root_password" MINIO_BROWSER: 'off' secrets: - s3_root_user - s3_root_password volumes: - s3_data:/data depends_on: s3: condition: service_started read_only: true tmpfs: - "/tmp:rw,size=16m" - "/root/.minio:rw,size=16m" s3-init: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: minio/mc:RELEASE.2025-08-13T08-35-41Z network_mode: service:s3 entrypoint: - "/bin/sh" - "/config/s3-init.sh" volumes: - "./infra/s3:/config:ro" - "./secrets/operator/s3-users.sh:/run/operator/users.sh:ro" secrets: - s3_root_user - s3_root_password depends_on: s3-store: condition: service_started tmpfs: - "/tmp:rw,size=16m" environment: MC_CONFIG_DIR: "/tmp/mc" restart: 'no' openbao: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: ghcr.io/openbao/openbao:2.7.3 entrypoint: - bao command: - server - "-config=/bao/config/server.hcl" environment: BAO_ADDR: https://127.0.0.1:8200 BAO_CACERT: "/run/tls/ca.crt" volumes: - "./infra/openbao/server.hcl:/bao/config/server.hcl:ro" - "./certs/private/openbao:/run/tls:ro" - bao_data:/bao/data - bao_audit:/bao/audit ports: - 127.0.0.1:${BAO_PORT:-8207}:8200 read_only: true tmpfs: - "/tmp:rw,size=16m" user: 10001:10001 depends_on: storage-init: condition: service_completed_successfully migrate: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - migrate environment: DATABASE_URL_FILE: "/run/secrets/migrate_database_url" OTEL_SDK_DISABLED: 'true' volumes: - "./certs/private/migrator:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" secrets: - migrate_database_url depends_on: postgres: condition: service_healthy restart: 'no' healthcheck: disable: true api: image: mtusi-messenger:lab7 build: "." user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 1 mem_limit: 768m logging: driver: json-file options: max-size: 10m max-file: '3' command: - supervise - api environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: api APP_PORT: '8080' SESSION_TTL_SECONDS: "${SESSION_TTL_SECONDS:-3600}" BAO_ADDR: https://openbao:8200 S3_ENDPOINT: https://s3:9000 S3_BUCKET: messenger-attachments OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318 DB_POOL_MAX: '10' GOMEMLIMIT: 600MiB WORKER_CONCURRENCY: "${WORKER_CONCURRENCY:-1}" volumes: - "./certs/private/api:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" depends_on: migrate: condition: service_completed_successfully openbao: condition: service_started s3-init: condition: service_completed_successfully stop_grace_period: 10s deploy: replicas: "${API_REPLICAS:-2}" worker: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 1 mem_limit: 1024m logging: driver: json-file options: max-size: 10m max-file: '3' command: - supervise - worker environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: worker APP_PORT: '8080' SESSION_TTL_SECONDS: "${SESSION_TTL_SECONDS:-3600}" BAO_ADDR: https://openbao:8200 S3_ENDPOINT: https://s3:9000 S3_BUCKET: messenger-attachments OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318 DB_POOL_MAX: '4' GOMEMLIMIT: 600MiB WORKER_CONCURRENCY: "${WORKER_CONCURRENCY:-1}" volumes: - "./certs/private/worker:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" depends_on: migrate: condition: service_completed_successfully openbao: condition: service_started s3-init: condition: service_completed_successfully stop_grace_period: 10s healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 dispatcher: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.25 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - supervise - dispatcher environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: dispatcher APP_PORT: '8080' SESSION_TTL_SECONDS: "${SESSION_TTL_SECONDS:-3600}" BAO_ADDR: https://openbao:8200 S3_ENDPOINT: https://s3:9000 S3_BUCKET: messenger-attachments OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318 DB_POOL_MAX: '4' GOMEMLIMIT: 600MiB WORKER_CONCURRENCY: "${WORKER_CONCURRENCY:-1}" volumes: - "./certs/private/dispatcher:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" depends_on: migrate: condition: service_completed_successfully openbao: condition: service_started s3-init: condition: service_completed_successfully stop_grace_period: 10s healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 housekeeping: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.25 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' command: - supervise - housekeeping environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: housekeeping APP_PORT: '8080' SESSION_TTL_SECONDS: "${SESSION_TTL_SECONDS:-3600}" BAO_ADDR: https://openbao:8200 S3_ENDPOINT: https://s3:9000 S3_BUCKET: messenger-attachments OTEL_EXPORTER_OTLP_ENDPOINT: https://collector:4318 DB_POOL_MAX: '4' GOMEMLIMIT: 600MiB WORKER_CONCURRENCY: "${WORKER_CONCURRENCY:-1}" volumes: - "./certs/private/housekeeping:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" depends_on: migrate: condition: service_completed_successfully openbao: condition: service_started s3-init: condition: service_completed_successfully stop_grace_period: 10s healthcheck: test: - CMD-SHELL - kill -0 1 interval: 2s timeout: 1s retries: 3 lb: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 1 mem_limit: 128m logging: driver: json-file options: max-size: 10m max-file: '3' image: haproxy:3.2.6-alpine user: 10001:10001 read_only: true tmpfs: - "/tmp:rw,size=16m" volumes: - "./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro" - "./certs/private/lb:/run/tls:ro" ports: - 127.0.0.1:${APP_PORT:-8443}:8443 depends_on: api: condition: service_started collector-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: otel/opentelemetry-collector-contrib:0.128.0 network_mode: service:collector command: - "--config=/etc/otelcol/config.yaml" volumes: - "./infra/otel/collector.yaml:/etc/otelcol/config.yaml:ro" - "./certs/private/collector:/run/tls:ro" depends_on: collector: condition: service_started read_only: true prometheus-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: prom/prometheus:v3.4.1 network_mode: service:prometheus command: - "--web.listen-address=127.0.0.1:9091" - "--config.file=/etc/prometheus/prometheus.yaml" - "--storage.tsdb.retention.time=24h" - "--storage.tsdb.retention.size=512MB" volumes: - "./infra/prometheus:/etc/prometheus:ro" - "./certs/private/prometheus:/run/tls:ro" - prometheus_data:/prometheus depends_on: prometheus: condition: service_started read_only: true loki-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: grafana/loki:3.5.1 network_mode: service:loki command: - "-config.file=/etc/loki/local-config.yaml" volumes: - "./infra/loki/loki.yaml:/etc/loki/local-config.yaml:ro" - loki_data:/loki depends_on: loki: condition: service_started read_only: true tmpfs: - "/tmp:rw,size=16m" tempo-store: cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: grafana/tempo:2.8.0 network_mode: service:tempo command: - "-config.file=/etc/tempo.yaml" volumes: - "./infra/tempo/tempo.yaml:/etc/tempo.yaml:ro" - tempo_data:/var/tempo depends_on: tempo: condition: service_started read_only: true tmpfs: - "/tmp:rw,size=16m" grafana-store: entrypoint: - "/bin/sh" - "/config/grafana-start.sh" cap_drop: - ALL security_opt: - no-new-privileges:true cpus: 0.5 mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: '3' image: grafana/grafana:12.0.2 network_mode: service:grafana environment: GF_SERVER_HTTP_ADDR: 127.0.0.1 GF_SERVER_HTTP_PORT: '3001' GF_AUTH_ANONYMOUS_ENABLED: 'false' GF_USERS_ALLOW_SIGN_UP: 'false' GF_SECURITY_ADMIN_PASSWORD__FILE: "/run/secrets/grafana_password" GF_PLUGINS_PREINSTALL_DISABLED: 'true' GF_ANALYTICS_REPORTING_ENABLED: 'false' GF_ANALYTICS_CHECK_FOR_UPDATES: 'false' secrets: - grafana_password volumes: - "./infra/grafana-start.sh:/config/grafana-start.sh:ro" - "./infra/grafana/provisioning:/etc/grafana/provisioning:ro" - "./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro" - "./certs/private/grafana:/run/tls:ro" - grafana_data:/var/lib/grafana depends_on: grafana: condition: service_started read_only: true tmpfs: - "/tmp:rw,size=16m" probe: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: &1 - ALL security_opt: &2 - no-new-privileges:true tmpfs: &3 - "/tmp:rw,noexec,nosuid,size=128m,mode=1777" - "/run/runtime:rw,noexec,nosuid,size=1m,uid=10001,gid=10001,mode=700" cpus: 0.5 mem_limit: 256m logging: &4 driver: json-file options: max-size: 10m max-file: '3' profiles: &5 - verify command: - probe environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: operator OTEL_SDK_DISABLED: 'true' volumes: - "./certs/private/operator:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./certs/private:/fixtures:ro" - "./secrets/operator:/operator:ro" healthcheck: &6 disable: true tests: image: mtusi-messenger-tests:lab7 build: context: "." target: tests user: '0:0' read_only: false cap_drop: - ALL security_opt: - no-new-privileges:true tmpfs: - "/tmp:rw,exec,nosuid,size=1536m" cpus: 2 mem_limit: 2048m logging: driver: json-file options: max-size: 10m max-file: '3' profiles: - verify entrypoint: - go command: - test - "-race" - "-count=1" - "-v" - "./..." environment: GOMAXPROCS: '2' GOFLAGS: "-p=2" DATABASE_TEST_URL_FILE: "/run/secrets/migrate_database_url" secrets: - migrate_database_url volumes: - "./certs/private/migrator:/run/tls:ro" - go_test_cache:/root/.cache/go-build healthcheck: disable: true storage-init: image: alpine:3.24.4 user: '0:0' read_only: true cap_drop: - ALL cap_add: - CHOWN - DAC_OVERRIDE security_opt: - no-new-privileges:true command: - chown - "-R" - 10001:10001 - "/bao/data" - "/bao/audit" volumes: - bao_data:/bao/data - bao_audit:/bao/audit cpus: 0.25 mem_limit: 32m restart: 'no' operator: image: mtusi-messenger:lab7 user: 10001:10001 read_only: true cap_drop: *1 security_opt: *2 tmpfs: *3 cpus: 0.5 mem_limit: 256m logging: *4 profiles: *5 command: - cleanup environment: TLS_CA_FILE: "/run/tls/ca.crt" TLS_CERT_FILE: "/run/tls/cert.crt" TLS_KEY_FILE: "/run/tls/key.key" TLS_REVOCATIONS_FILE: "/config/revoked.json" SERVICE_ID: operator OTEL_SDK_DISABLED: 'true' RUNTIME_SECRET_FILE: "/operator/admin-runtime.json" S3_ENDPOINT: https://s3:9000 volumes: - "./certs/private/operator:/run/tls:ro" - "./infra/tls/revoked.json:/config/revoked.json:ro" - "./secrets/operator/admin-runtime.json:/operator/admin-runtime.json:ro" healthcheck: *6 secrets: postgres_password: file: "./secrets/postgres_password" migrate_database_url: file: "./secrets/migrate_database_url" s3_root_user: file: "./secrets/s3_root_user" s3_root_password: file: "./secrets/s3_root_password" grafana_password: file: "./secrets/grafana_password" broker_config: file: "./secrets/broker_config" valkey_config: file: "./secrets/valkey_config" volumes: postgres_data: s3_data: broker_data: bao_data: bao_audit: prometheus_data: loki_data: tempo_data: grafana_data: go_test_cache: