Files
mtusi2026lab7/docker-compose.yml
T

852 lines
22 KiB
YAML

services:
gateway:
image: nginx:1.30.8-alpine@sha256:8eb04fe3b385090e9aa02961f77398ad09b6bf33ab07f6669a5bb7acce22c0d3
user: 101:101
command:
- nginx
- -g
- daemon off;
volumes:
- ./infra/security/gateway.conf:/etc/nginx/nginx.conf:ro
- ./secrets/gateway:/identity:ro
- ./secrets/public:/pki:ro
networks:
messenger-net:
aliases:
- broker
- redis
- otel-collector
- prometheus
- loki
- tempo
- grafana
ports:
- 127.0.0.1:13007:3000
mem_limit: 64m
restart: unless-stopped
read_only: true
security_opt: &id001
- no-new-privileges:true
cap_drop: &id002
- ALL
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,mode=1777,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
db:
image: postgres:16-alpine@sha256:0cefaabd882e42bcb2a2f3dc56d3ce4770560ba62fd7f197f1a2e008fd5731ab
restart: unless-stopped
environment:
POSTGRES_DB: messenger
POSTGRES_USER: operator
POSTGRES_PASSWORD_FILE: /operator/postgres_password
volumes:
- pgdata:/var/lib/postgresql/data
- ./secrets/db:/identity:ro
- ./secrets/public:/pki:ro
- ./secrets/operator/postgres_password:/operator/postgres_password:ro
- ./infra/security/postgres-start.sh:/start.sh:ro
- ./infra/security/pg_hba.conf:/etc/pg_hba.conf:ro
networks:
- messenger-net
healthcheck:
test:
- CMD
- pg_isready
- -U
- operator
- -d
- messenger
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
pids: 256
entrypoint:
- sh
- /start.sh
command:
- postgres
- -c
- ssl=on
- -c
- ssl_cert_file=/tmp/pg-tls/server.crt
- -c
- ssl_key_file=/tmp/pg-tls/server.key
- -c
- hba_file=/etc/pg_hba.conf
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,nosuid,size=16m
mem_limit: 512m
pids_limit: 256
broker:
image: redis:7.4-alpine@sha256:8da19c7399dca900c6822a1cf30f9d2285585e2c4b457ff4095b0f4500054d3f
restart: unless-stopped
command:
- redis-server
- --bind
- 127.0.0.1
- --port
- '16379'
- --appendonly
- 'yes'
- --appendfsync
- always
- --save
- ''
- --aclfile
- /config/broker.acl
volumes:
- brokerdata:/data
- ./secrets/operator/broker.acl:/config/broker.acl:ro
healthcheck:
test:
- CMD-SHELL
- redis-cli -p 16379 ping | grep -q NOAUTH
interval: 5s
timeout: 3s
retries: 20
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
user: 999:999
mem_limit: 128m
cpus: '0.5'
pids_limit: 256
redis:
image: redis:7.4-alpine@sha256:8da19c7399dca900c6822a1cf30f9d2285585e2c4b457ff4095b0f4500054d3f
restart: unless-stopped
command:
- redis-server
- --bind
- 127.0.0.1
- --port
- '16380'
- --appendonly
- 'yes'
- --appendfsync
- everysec
- --save
- ''
- --aclfile
- /config/redis.acl
volumes:
- redisdata:/data
- ./secrets/operator/redis.acl:/config/redis.acl:ro
healthcheck:
test:
- CMD-SHELL
- redis-cli -p 16380 ping | grep -q NOAUTH
interval: 5s
timeout: 3s
retries: 20
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
user: 999:999
mem_limit: 128m
cpus: '0.5'
pids_limit: 256
minio:
image: pgsty/silo@sha256:7bb2aff6b89efe1cb1303c10fc21d579447434ed06649ac9ec05a5e2dbf30ad7
command:
- server
- /data
- --certs-dir
- /certs
- --console-address
- :9001
environment:
MINIO_ROOT_USER_FILE: /operator/minio_root_user
MINIO_ROOT_PASSWORD_FILE: /operator/minio_root_password
MINIO_BROWSER: 'off'
HOME: /tmp
volumes:
- minio-data:/data
- ./secrets/minio:/certs:ro
- ./secrets/operator/minio_root_user:/operator/minio_root_user:ro
- ./secrets/operator/minio_root_password:/operator/minio_root_password:ro
- ./secrets/public:/pki:ro
networks:
- messenger-net
healthcheck:
test:
- CMD-SHELL
- curl --cacert /pki/ca.crt -f https://localhost:9000/minio/health/ready
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
mem_limit: 384m
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cpus: '0.5'
user: 10001:10001
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,size=32m
pids_limit: 256
openbao:
image: openbao/openbao:2.7.3@sha256:ba4b133eb9586630024e71a617e66f37f29cc3534cdd46a6233e098ceded8dc9
command:
- server
- -config=/etc/bao/config.hcl
volumes:
- bao-raft-data:/bao/file
- ./infra/security/bao.hcl:/etc/bao/config.hcl:ro
- ./secrets/openbao:/identity:ro
- ./secrets/public:/pki:ro
networks:
- messenger-net
ports:
- 127.0.0.1:18200:8200
mem_limit: 256m
restart: unless-stopped
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
user: 100:1000
entrypoint:
- /usr/bin/bao
cpus: '0.5'
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,size=32m
pids_limit: 256
otel-collector:
image: otel/opentelemetry-collector-contrib:0.128.0@sha256:1ab0baba0ee3695d823c46653d8a6e8894896e668ce8bd7ebe002e948d827bc7
command:
- --config=/etc/otelcol/collector.yaml
volumes:
- ./infra/otel/collector.yaml:/etc/otelcol/collector.yaml:ro
- ./secrets/collector:/identity:ro
- ./secrets/public:/pki:ro
mem_limit: 192m
restart: unless-stopped
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
prometheus:
image: prom/prometheus:v3.4.1@sha256:9abc6cf6aea7710d163dbb28d8eeb7dc5baef01e38fa4cd146a406dd9f07f70d
command:
- --config.file=/etc/prometheus/prometheus.yaml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=24h
- --storage.tsdb.retention.size=512MB
- --web.listen-address=127.0.0.1:19090
volumes:
- ./infra/otel/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
- ./infra/otel/alerts.yaml:/etc/prometheus/alerts.yaml:ro
- prometheus-data:/prometheus
- ./secrets/prometheus:/identity:ro
- ./secrets/public:/pki:ro
mem_limit: 256m
restart: unless-stopped
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
loki:
image: grafana/loki:3.5.1@sha256:a74594532eec4cc313401beedc4dd2708c43674c032084b1aeb87c14a5be1745
command:
- -config.file=/etc/loki/loki.yaml
volumes:
- ./infra/otel/loki.yaml:/etc/loki/loki.yaml:ro
- loki-data:/loki
mem_limit: 384m
restart: unless-stopped
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
tempo:
image: grafana/tempo:2.8.1@sha256:bc9245fe3da4e63dc4c6862d9c2dad9bcd8be13d0ba4f7705fa6acda4c904d0e
command:
- -config.file=/etc/tempo/tempo.yaml
volumes:
- ./infra/otel/tempo.yaml:/etc/tempo/tempo.yaml:ro
- tempo-data:/var/tempo
mem_limit: 256m
restart: unless-stopped
network_mode: service:gateway
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
grafana:
image: grafana/grafana:12.0.2@sha256:b5b59bfc7561634c2d7b136c4543d702ebcc94a3da477f21ff26f89ffd4214fa
environment:
GF_AUTH_ANONYMOUS_ENABLED: 'false'
GF_AUTH_ANONYMOUS_ORG_ROLE: Viewer
GF_AUTH_DISABLE_LOGIN_FORM: 'false'
GF_SECURITY_ADMIN_PASSWORD__FILE: /operator/grafana_password
GF_ANALYTICS_REPORTING_ENABLED: 'false'
GF_ANALYTICS_CHECK_FOR_UPDATES: 'false'
GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES: 'false'
GF_PLUGINS_PREINSTALL_DISABLED: 'true'
GF_SERVER_HTTP_ADDR: 127.0.0.1
GF_SERVER_HTTP_PORT: '13000'
GF_SECURITY_COOKIE_SECURE: 'true'
GF_SERVER_ROOT_URL: https://localhost:13007
volumes:
- ./infra/otel/grafana/provisioning:/etc/grafana/provisioning:ro
- ./infra/otel/grafana/dashboards:/var/lib/grafana/dashboards:ro
- grafana-data:/var/lib/grafana
- ./secrets/grafana:/identity:ro
- ./secrets/public:/pki:ro
- ./secrets/operator/grafana_password:/operator/grafana_password:ro
- ./infra/security/grafana-start.sh:/start.sh:ro
mem_limit: 256m
restart: unless-stopped
network_mode: service:gateway
entrypoint:
- sh
- /start.sh
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
pids_limit: 256
api-agent:
build: &id003
context: .
dockerfile: worker/Dockerfile
command:
- python
- -m
- pipeline.secret_agent
environment:
SERVICE_IDENTITY: api
volumes:
- ./secrets/api:/identity:ro
- ./secrets/public:/pki:ro
- api-runtime:/runtime
networks:
- messenger-net
healthcheck:
test:
- CMD
- python
- -c
- import pathlib,time; assert time.time()-pathlib.Path('/runtime/lease').stat().st_mtime<25
interval: 3s
timeout: 2s
retries: 50
mem_limit: 64m
restart: unless-stopped
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
image: messenger-lab7-api-agent:7.0.0
pids_limit: 64
api:
stop_grace_period: 40s
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
api-agent:
condition: service_healthy
db:
condition: service_healthy
environment:
RECONCILER_INTERVAL_MS: ${RECONCILER_INTERVAL_MS:-3600000}
RECONCILER_DRY_RUN: ${RECONCILER_DRY_RUN:-false}
RECONCILER_GRACE_PERIOD_MINUTES: ${RECONCILER_GRACE_PERIOD_MINUTES:-15}
JAVA_OPTS: -Xmx320m -Xss512k -Djavax.net.ssl.trustStore=/identity/trust.p12
-Djavax.net.ssl.trustStoreType=PKCS12
OTEL_SERVICE_NAME: messenger-api
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
OTEL_EXPORTER_OTLP_TIMEOUT: 1500
OTEL_METRIC_EXPORT_INTERVAL: 5000
OTEL_BSP_MAX_QUEUE_SIZE: 256
OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 64
OTEL_BLRP_MAX_QUEUE_SIZE: 256
OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 64
OTEL_PROPAGATORS: tracecontext
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
MAX_PENDING_JOBS: ${MAX_PENDING_JOBS:-100}
RATE_PER_MINUTE: '100000'
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/messenger?sslmode=verify-full&sslrootcert=/pki/ca.crt
SPRING_PROFILES_ACTIVE: ${APP_ENV:-lab}
SPRING_FLYWAY_ENABLED: 'false'
SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600}
SESSION_STORE: ${SESSION_STORE:-postgres}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: '6380'
MAX_MESSAGES_PER_CHAT: ${MAX_MESSAGES_PER_CHAT:-10000}
S3_ENDPOINT: https://minio:9000
S3_BUCKET: messenger-attachments
S3_REGION: us-east-1
OTEL_EXPORTER_OTLP_CERTIFICATE: /pki/ca.crt
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /identity/service.crt
OTEL_EXPORTER_OTLP_CLIENT_KEY: /identity/service.key
SSL_CERT_FILE: /pki/ca.crt
REQUESTS_CA_BUNDLE: /pki/ca.crt
AWS_CA_BUNDLE: /pki/ca.crt
SPRING_CONFIG_IMPORT: configtree:/runtime/
APP_PORT: '8443'
RECONCILER_ENABLED: 'false'
SERVER_SSL_ENABLED: 'true'
SERVER_SSL_CERTIFICATE: file:/identity/service.crt
SERVER_SSL_CERTIFICATE_PRIVATE_KEY: file:/identity/service.key
SERVER_SSL_TRUST_CERTIFICATE: file:/pki/ca.crt
SERVER_SSL_CLIENT_AUTH: need
S3_ACCESS_KEY_ID_FILE: /runtime/s3.access-key
S3_SECRET_ACCESS_KEY_FILE: /runtime/s3.secret-key
networks:
- messenger-net
deploy:
replicas: 2
resources:
limits:
cpus: '1.0'
memory: 512M
pids: 512
healthcheck:
test:
- CMD-SHELL
- wget -qO- http://127.0.0.1:8081/actuator/health/readiness | grep -q '"status":"UP"'
interval: 5s
timeout: 3s
retries: 20
start_period: 40s
volumes:
- ./secrets/api:/identity:ro
- ./secrets/public:/pki:ro
- api-runtime:/runtime:ro
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
image: messenger-lab7-api:7.0.0
pids_limit: 512
worker-agent:
build: *id003
command:
- python
- -m
- pipeline.secret_agent
environment:
SERVICE_IDENTITY: worker
volumes:
- ./secrets/worker:/identity:ro
- ./secrets/public:/pki:ro
- worker-runtime:/runtime
networks:
- messenger-net
healthcheck:
test:
- CMD
- python
- -c
- import pathlib,time; assert time.time()-pathlib.Path('/runtime/lease').stat().st_mtime<25
interval: 3s
timeout: 2s
retries: 50
mem_limit: 64m
restart: unless-stopped
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
image: messenger-lab7-worker-agent:7.0.0
pids_limit: 64
worker:
build: &id004
context: .
dockerfile: worker/Dockerfile
restart: unless-stopped
environment:
ROLE: worker
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
DB_HOST: db
BROKER_HOST: broker
S3_ENDPOINT: https://minio:9000
S3_BUCKET: messenger-attachments
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-75}
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
FAULT_INJECTION_ENABLED: ${FAULT_INJECTION_ENABLED:-false}
OTEL_EXPORTER_OTLP_CERTIFICATE: /pki/ca.crt
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /identity/service.crt
OTEL_EXPORTER_OTLP_CLIENT_KEY: /identity/service.key
SSL_CERT_FILE: /pki/ca.crt
REQUESTS_CA_BUNDLE: /pki/ca.crt
AWS_CA_BUNDLE: /pki/ca.crt
networks: &id005
- messenger-net
depends_on:
worker-agent:
condition: service_healthy
db:
condition: service_healthy
deploy:
replicas: ${WORKER_CONCURRENCY:-2}
resources:
limits:
cpus: '1.0'
memory: 1G
pids: 64
volumes:
- ./secrets/worker:/identity:ro
- ./secrets/public:/pki:ro
- worker-runtime:/runtime:ro
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
image: messenger-lab7-worker:7.0.0
pids_limit: 64
dispatcher-agent:
build: *id003
command:
- python
- -m
- pipeline.secret_agent
environment:
SERVICE_IDENTITY: dispatcher
volumes:
- ./secrets/dispatcher:/identity:ro
- ./secrets/public:/pki:ro
- dispatcher-runtime:/runtime
networks:
- messenger-net
healthcheck:
test:
- CMD
- python
- -c
- import pathlib,time; assert time.time()-pathlib.Path('/runtime/lease').stat().st_mtime<25
interval: 3s
timeout: 2s
retries: 50
mem_limit: 64m
restart: unless-stopped
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
cpus: '0.5'
image: messenger-lab7-dispatcher-agent:7.0.0
pids_limit: 64
dispatcher:
build: *id004
restart: unless-stopped
environment:
ROLE: dispatcher
OTEL_EXPORTER_OTLP_ENDPOINT: https://otel-collector:4318
DB_HOST: db
BROKER_HOST: broker
S3_ENDPOINT: https://minio:9000
S3_BUCKET: messenger-attachments
JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5}
JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60}
JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-75}
STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400}
FAULT_INJECTION_ENABLED: ${FAULT_INJECTION_ENABLED:-false}
OTEL_EXPORTER_OTLP_CERTIFICATE: /pki/ca.crt
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /identity/service.crt
OTEL_EXPORTER_OTLP_CLIENT_KEY: /identity/service.key
SSL_CERT_FILE: /pki/ca.crt
REQUESTS_CA_BUNDLE: /pki/ca.crt
AWS_CA_BUNDLE: /pki/ca.crt
networks: *id005
depends_on:
dispatcher-agent:
condition: service_healthy
db:
condition: service_healthy
deploy:
replicas: 1
resources:
limits:
cpus: '0.5'
memory: 256M
pids: 64
volumes:
- ./secrets/dispatcher:/identity:ro
- ./secrets/public:/pki:ro
- dispatcher-runtime:/runtime:ro
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,noexec,nosuid,size=16m
image: messenger-lab7-dispatcher:7.0.0
pids_limit: 64
lb:
image: nginx:1.30.8-alpine@sha256:8eb04fe3b385090e9aa02961f77398ad09b6bf33ab07f6669a5bb7acce22c0d3
restart: unless-stopped
ports:
- 127.0.0.1:8443:8443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./secrets/lb:/identity:ro
- ./secrets/public:/pki:ro
depends_on:
api:
condition: service_healthy
networks:
- messenger-net
read_only: true
security_opt: *id001
cap_drop: *id002
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
- /var/cache/nginx:rw,mode=1777,noexec,nosuid,size=16m
user: 101:101
mem_limit: 64m
cpus: '0.5'
pids_limit: 256
s3-admin:
image: pgsty/mc@sha256:ce62c9053c69ce12a527a322345b5ad9f44b5f8a7b8189f82e516f2e3f30f1d8
profiles:
- operator
entrypoint:
- /bin/sh
environment:
SSL_CERT_FILE: /pki/ca.crt
volumes:
- ./secrets/public:/root/.mc/certs/CAs:ro
- ./secrets/public:/pki:ro
- ./infra/security/policies:/policies:ro
networks:
- messenger-net
cpus: '0.5'
mem_limit: 128m
pids_limit: 256
bao-permissions:
image: openbao/openbao:2.7.3@sha256:ba4b133eb9586630024e71a617e66f37f29cc3534cdd46a6233e098ceded8dc9
profiles:
- operator
user: 0:0
entrypoint:
- sh
- -c
command:
- chown 100:1000 /bao/file
volumes:
- bao-raft-data:/bao/file
network_mode: none
cap_drop:
- ALL
cap_add:
- CHOWN
security_opt:
- no-new-privileges:true
mem_limit: 32m
cpus: '0.1'
pids_limit: 256
audit:
image: messenger-lab7-worker:7.0.0
profiles:
- operator
entrypoint:
- python
volumes:
- ./secrets:/audit-secrets:ro
- ./student-tests:/checks:ro
networks:
- messenger-net
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,noexec,nosuid,size=16m
cpus: '0.5'
mem_limit: 128m
pids_limit: 256
pipeline-admin:
image: messenger-lab7-worker:7.0.0
profiles:
- operator
entrypoint:
- python
- -m
- pipeline.operator
environment:
OPERATOR_CREDENTIALS_FILE: /run/operator/pipeline.json
volumes:
- ./secrets/public:/pki:ro
- ./secrets/operator/pipeline.json:/run/operator/pipeline.json:ro
networks:
- messenger-net
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,noexec,nosuid,size=16m
cpus: '0.5'
mem_limit: 128m
pids_limit: 256
s3-permissions:
image: pgsty/silo@sha256:7bb2aff6b89efe1cb1303c10fc21d579447434ed06649ac9ec05a5e2dbf30ad7
profiles:
- operator
user: 0:0
entrypoint:
- sh
- -c
command:
- chown -R 10001:10001 /data
volumes:
- minio-data:/data
network_mode: none
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
security_opt:
- no-new-privileges:true
mem_limit: 32m
cpus: '0.1'
pids_limit: 256
pipeline-diagnostics:
image: messenger-lab7-worker:7.0.0
profiles:
- operator
entrypoint:
- python
environment:
OPERATOR_CREDENTIALS_FILE: /run/operator/diagnostics.json
AWS_CA_BUNDLE: /pki/ca.crt
S3_ENDPOINT: https://minio:9000
volumes:
- ./secrets/public:/pki:ro
- ./secrets/operator/diagnostics.json:/run/operator/diagnostics.json:ro
networks:
- messenger-net
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,noexec,nosuid,size=32m
cpus: '1'
mem_limit: 512m
pids_limit: 256
bao-migrate:
image: openbao/openbao:2.7.3@sha256:ba4b133eb9586630024e71a617e66f37f29cc3534cdd46a6233e098ceded8dc9
profiles:
- operator
user: 100:1000
entrypoint:
- /usr/bin/bao
command:
- operator
- migrate
- -config=/migration.hcl
volumes:
- bao-data:/old
- bao-raft-data:/bao/file
- ./infra/security/bao-migrate.hcl:/migration.hcl:ro
network_mode: none
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,noexec,nosuid,size=16m
mem_limit: 256m
cpus: '0.5'
pids_limit: 256
volumes:
prometheus-data: null
loki-data: null
tempo-data: null
grafana-data: null
pgdata: null
redisdata: null
minio-data: null
brokerdata: null
bao-data: {}
api-runtime:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: size=1m,uid=10001,gid=10001,mode=0700
worker-runtime:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: size=1m,uid=10001,gid=10001,mode=0700
dispatcher-runtime:
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: size=1m,uid=10001,gid=10001,mode=0700
bao-raft-data: {}
networks:
messenger-net:
driver: bridge