forked from mtusi2026/mtusi2026lab7
1031 lines
28 KiB
YAML
1031 lines
28 KiB
YAML
{
|
|
"name": "mtusi2026lab7",
|
|
"services": {
|
|
"api": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"restart": "unless-stopped",
|
|
"user": "65532:65532",
|
|
"cpus": 1,
|
|
"mem_limit": "512m",
|
|
"environment": {
|
|
"APPLICATION_ENVIRONMENT": "prod",
|
|
"APPLICATION_LOG_LEVEL": "info",
|
|
"APPLICATION_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_ENABLED": "true",
|
|
"APP_HOST": "0.0.0.0",
|
|
"APP_IDLE_TIMEOUT": "60s",
|
|
"APP_PORT": 8080,
|
|
"APP_READ_TIMEOUT": "125s",
|
|
"APP_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_WRITE_TIMEOUT": "125s",
|
|
"BROKER_URL_FILE": "/run/identity/broker_url",
|
|
"GOMEMLIMIT": "384MiB",
|
|
"JOB_LEASE": "90s",
|
|
"JOB_MAX_ATTEMPTS": "5",
|
|
"JOB_TIMEOUT": "60s",
|
|
"JWT_ACCESS_TOKEN_LIFETIME": "15m",
|
|
"MAX_IMAGE_PIXELS": "40000000",
|
|
"MAX_UPLOAD_BYTES": "10485760",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:9443",
|
|
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
|
"OTEL_SDK_DISABLED": "false",
|
|
"POSTGRES_CONNECT_TIMEOUT": "500ms",
|
|
"POSTGRES_DATABASE": "messenger",
|
|
"POSTGRES_HOST": "postgres",
|
|
"POSTGRES_MAX_CONNECTIONS": "16",
|
|
"POSTGRES_PORT": 5432,
|
|
"POSTGRES_QUERY_TIMEOUT": "2s",
|
|
"POSTGRES_RUN_MIGRATIONS": "false",
|
|
"POSTGRES_USER": "api",
|
|
"POSTGRES_VERSION_TABLE": "versions",
|
|
"RECONCILE_GRACE_PERIOD": "1h",
|
|
"REDIS_DB": 0,
|
|
"REDIS_HOST": "redis",
|
|
"REDIS_PORT": "6380",
|
|
"REDIS_USERNAME": "api",
|
|
"S3_BUCKET": "messenger-attachments",
|
|
"S3_ENDPOINT": "https://s3:9443",
|
|
"S3_REGION": "us-east-1",
|
|
"SESSION_TTL_SECONDS": "3600",
|
|
"STAGING_RETENTION": "24h",
|
|
"UPLOAD_TIMEOUT": "120s",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"WORKER_PREFETCH": "2",
|
|
"TLS_REQUIRED": "true",
|
|
"JWT_PRIVATE_KEY_PATH": "/run/identity/jwt.key",
|
|
"JWT_PUBLIC_KEY_PATH": "/run/identity/jwt.pub",
|
|
"BAO_ADDR": "https://openbao:8200",
|
|
"SERVICE_ROLE": "api",
|
|
"ARGON2_MEMORY_KIB": "65536",
|
|
"ARGON2_ITERATIONS": "3",
|
|
"ARGON2_PARALLELISM": "1"
|
|
},
|
|
"volumes": [
|
|
"./secrets/lab7/api:/run/identity:ro"
|
|
],
|
|
"networks": [
|
|
"default"
|
|
],
|
|
"read_only": true,
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"tmpfs": [
|
|
"/tmp:size=256m,mode=1777",
|
|
"/run/credentials:uid=65532,gid=65532,mode=0700,size=1m"
|
|
],
|
|
"stop_grace_period": "10s",
|
|
"deploy": {
|
|
"replicas": 2
|
|
},
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD",
|
|
"wget",
|
|
"-q",
|
|
"-O",
|
|
"/dev/null",
|
|
"http://127.0.0.1:8081/health/ready"
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "3s",
|
|
"retries": 30
|
|
}
|
|
},
|
|
"worker": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"restart": "unless-stopped",
|
|
"user": "65532:65532",
|
|
"cpus": 1,
|
|
"mem_limit": "1g",
|
|
"environment": {
|
|
"APPLICATION_ENVIRONMENT": "prod",
|
|
"APPLICATION_LOG_LEVEL": "info",
|
|
"APPLICATION_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_ENABLED": "true",
|
|
"APP_HOST": "0.0.0.0",
|
|
"APP_IDLE_TIMEOUT": "60s",
|
|
"APP_PORT": 8080,
|
|
"APP_READ_TIMEOUT": "125s",
|
|
"APP_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_WRITE_TIMEOUT": "125s",
|
|
"BROKER_URL_FILE": "/run/identity/broker_url",
|
|
"GOMEMLIMIT": "384MiB",
|
|
"JOB_LEASE": "90s",
|
|
"JOB_MAX_ATTEMPTS": "5",
|
|
"JOB_TIMEOUT": "60s",
|
|
"JWT_ACCESS_TOKEN_LIFETIME": "15m",
|
|
"MAX_IMAGE_PIXELS": "40000000",
|
|
"MAX_UPLOAD_BYTES": "10485760",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:9443",
|
|
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
|
"OTEL_SDK_DISABLED": "false",
|
|
"POSTGRES_CONNECT_TIMEOUT": "500ms",
|
|
"POSTGRES_DATABASE": "messenger",
|
|
"POSTGRES_HOST": "postgres",
|
|
"POSTGRES_MAX_CONNECTIONS": "16",
|
|
"POSTGRES_PORT": 5432,
|
|
"POSTGRES_QUERY_TIMEOUT": "2s",
|
|
"POSTGRES_RUN_MIGRATIONS": "false",
|
|
"POSTGRES_USER": "api",
|
|
"POSTGRES_VERSION_TABLE": "versions",
|
|
"RECONCILE_GRACE_PERIOD": "1h",
|
|
"REDIS_DB": 0,
|
|
"REDIS_HOST": "redis",
|
|
"REDIS_PORT": "6380",
|
|
"REDIS_USERNAME": "api",
|
|
"S3_BUCKET": "messenger-attachments",
|
|
"S3_ENDPOINT": "https://s3:9443",
|
|
"S3_REGION": "us-east-1",
|
|
"SESSION_TTL_SECONDS": "3600",
|
|
"STAGING_RETENTION": "24h",
|
|
"UPLOAD_TIMEOUT": "120s",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"WORKER_PREFETCH": "2",
|
|
"TLS_REQUIRED": "true",
|
|
"BAO_ADDR": "https://openbao:8200",
|
|
"SERVICE_ROLE": "worker",
|
|
"ARGON2_MEMORY_KIB": "65536",
|
|
"ARGON2_ITERATIONS": "3",
|
|
"ARGON2_PARALLELISM": "1"
|
|
},
|
|
"volumes": [
|
|
"./secrets/lab7/worker:/run/identity:ro"
|
|
],
|
|
"networks": [
|
|
"default"
|
|
],
|
|
"read_only": true,
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"tmpfs": [
|
|
"/tmp:size=256m,mode=1777",
|
|
"/run/credentials:uid=65532,gid=65532,mode=0700,size=1m"
|
|
],
|
|
"stop_grace_period": "10s",
|
|
"command": [
|
|
"worker"
|
|
],
|
|
"healthcheck": {
|
|
"disable": true
|
|
}
|
|
},
|
|
"dispatcher": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"restart": "unless-stopped",
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "512m",
|
|
"environment": {
|
|
"APPLICATION_ENVIRONMENT": "prod",
|
|
"APPLICATION_LOG_LEVEL": "info",
|
|
"APPLICATION_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_ENABLED": "true",
|
|
"APP_HOST": "0.0.0.0",
|
|
"APP_IDLE_TIMEOUT": "60s",
|
|
"APP_PORT": 8080,
|
|
"APP_READ_TIMEOUT": "125s",
|
|
"APP_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_WRITE_TIMEOUT": "125s",
|
|
"BROKER_URL_FILE": "/run/identity/broker_url",
|
|
"GOMEMLIMIT": "384MiB",
|
|
"JOB_LEASE": "90s",
|
|
"JOB_MAX_ATTEMPTS": "5",
|
|
"JOB_TIMEOUT": "60s",
|
|
"JWT_ACCESS_TOKEN_LIFETIME": "15m",
|
|
"MAX_IMAGE_PIXELS": "40000000",
|
|
"MAX_UPLOAD_BYTES": "10485760",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:9443",
|
|
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
|
"OTEL_SDK_DISABLED": "false",
|
|
"POSTGRES_CONNECT_TIMEOUT": "500ms",
|
|
"POSTGRES_DATABASE": "messenger",
|
|
"POSTGRES_HOST": "postgres",
|
|
"POSTGRES_MAX_CONNECTIONS": "16",
|
|
"POSTGRES_PORT": 5432,
|
|
"POSTGRES_QUERY_TIMEOUT": "2s",
|
|
"POSTGRES_RUN_MIGRATIONS": "false",
|
|
"POSTGRES_USER": "api",
|
|
"POSTGRES_VERSION_TABLE": "versions",
|
|
"RECONCILE_GRACE_PERIOD": "1h",
|
|
"REDIS_DB": 0,
|
|
"REDIS_HOST": "redis",
|
|
"REDIS_PORT": "6380",
|
|
"REDIS_USERNAME": "api",
|
|
"S3_BUCKET": "messenger-attachments",
|
|
"S3_ENDPOINT": "https://s3:9443",
|
|
"S3_REGION": "us-east-1",
|
|
"SESSION_TTL_SECONDS": "3600",
|
|
"STAGING_RETENTION": "24h",
|
|
"UPLOAD_TIMEOUT": "120s",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"WORKER_PREFETCH": "2",
|
|
"TLS_REQUIRED": "true",
|
|
"BAO_ADDR": "https://openbao:8200",
|
|
"SERVICE_ROLE": "dispatcher",
|
|
"ARGON2_MEMORY_KIB": "65536",
|
|
"ARGON2_ITERATIONS": "3",
|
|
"ARGON2_PARALLELISM": "1"
|
|
},
|
|
"volumes": [
|
|
"./secrets/lab7/dispatcher:/run/identity:ro"
|
|
],
|
|
"networks": [
|
|
"default"
|
|
],
|
|
"read_only": true,
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"tmpfs": [
|
|
"/tmp:size=256m,mode=1777",
|
|
"/run/credentials:uid=65532,gid=65532,mode=0700,size=1m"
|
|
],
|
|
"stop_grace_period": "10s",
|
|
"command": [
|
|
"dispatcher"
|
|
],
|
|
"healthcheck": {
|
|
"disable": true
|
|
}
|
|
},
|
|
"migrate": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"restart": "no",
|
|
"user": "65532:65532",
|
|
"cpus": 1,
|
|
"mem_limit": "512m",
|
|
"environment": {
|
|
"APPLICATION_ENVIRONMENT": "prod",
|
|
"APPLICATION_LOG_LEVEL": "info",
|
|
"APPLICATION_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_ENABLED": "true",
|
|
"APP_HOST": "0.0.0.0",
|
|
"APP_IDLE_TIMEOUT": "60s",
|
|
"APP_PORT": 8080,
|
|
"APP_READ_TIMEOUT": "125s",
|
|
"APP_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_WRITE_TIMEOUT": "125s",
|
|
"BROKER_URL_FILE": "/run/identity/broker_url",
|
|
"GOMEMLIMIT": "384MiB",
|
|
"JOB_LEASE": "90s",
|
|
"JOB_MAX_ATTEMPTS": "5",
|
|
"JOB_TIMEOUT": "60s",
|
|
"JWT_ACCESS_TOKEN_LIFETIME": "15m",
|
|
"MAX_IMAGE_PIXELS": "40000000",
|
|
"MAX_UPLOAD_BYTES": "10485760",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:9443",
|
|
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
|
"OTEL_SDK_DISABLED": "true",
|
|
"POSTGRES_CONNECT_TIMEOUT": "500ms",
|
|
"POSTGRES_DATABASE": "messenger",
|
|
"POSTGRES_HOST": "postgres",
|
|
"POSTGRES_MAX_CONNECTIONS": "16",
|
|
"POSTGRES_PORT": 5432,
|
|
"POSTGRES_QUERY_TIMEOUT": "2s",
|
|
"POSTGRES_RUN_MIGRATIONS": "false",
|
|
"POSTGRES_USER": "messenger",
|
|
"POSTGRES_VERSION_TABLE": "versions",
|
|
"RECONCILE_GRACE_PERIOD": "1h",
|
|
"REDIS_DB": 0,
|
|
"REDIS_HOST": "redis",
|
|
"REDIS_PORT": "6380",
|
|
"REDIS_USERNAME": "api",
|
|
"S3_BUCKET": "messenger-attachments",
|
|
"S3_ENDPOINT": "https://s3:9443",
|
|
"S3_REGION": "us-east-1",
|
|
"SESSION_TTL_SECONDS": "3600",
|
|
"STAGING_RETENTION": "24h",
|
|
"UPLOAD_TIMEOUT": "120s",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"WORKER_PREFETCH": "2",
|
|
"TLS_REQUIRED": "true",
|
|
"JWT_PRIVATE_KEY_PATH": "/run/identity/jwt.key",
|
|
"JWT_PUBLIC_KEY_PATH": "/run/identity/jwt.pub",
|
|
"BAO_ADDR": "",
|
|
"SERVICE_ROLE": "api",
|
|
"ARGON2_MEMORY_KIB": "65536",
|
|
"ARGON2_ITERATIONS": "3",
|
|
"ARGON2_PARALLELISM": "1",
|
|
"POSTGRES_PASSWORD_FILE": "/run/dbpassword"
|
|
},
|
|
"volumes": [
|
|
"./secrets/lab7/operator-client:/run/identity:ro",
|
|
"./secrets/lab7/postgres/password:/run/dbpassword:ro"
|
|
],
|
|
"networks": [
|
|
"default"
|
|
],
|
|
"read_only": true,
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"tmpfs": [
|
|
"/tmp:size=256m,mode=1777",
|
|
"/run/credentials:uid=65532,gid=65532,mode=0700,size=1m"
|
|
],
|
|
"stop_grace_period": "10s",
|
|
"deploy": {},
|
|
"healthcheck": {
|
|
"disable": true
|
|
},
|
|
"command": [
|
|
"migrate"
|
|
]
|
|
},
|
|
"operator": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"restart": "no",
|
|
"user": "65532:65532",
|
|
"cpus": 1,
|
|
"mem_limit": "512m",
|
|
"environment": {
|
|
"APPLICATION_ENVIRONMENT": "prod",
|
|
"APPLICATION_LOG_LEVEL": "info",
|
|
"APPLICATION_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_ENABLED": "true",
|
|
"APP_HOST": "0.0.0.0",
|
|
"APP_IDLE_TIMEOUT": "60s",
|
|
"APP_PORT": 8080,
|
|
"APP_READ_TIMEOUT": "125s",
|
|
"APP_SHUTDOWN_TIMEOUT": "8s",
|
|
"APP_WRITE_TIMEOUT": "125s",
|
|
"BROKER_URL_FILE": "/run/identity/broker_url",
|
|
"GOMEMLIMIT": "384MiB",
|
|
"JOB_LEASE": "90s",
|
|
"JOB_MAX_ATTEMPTS": "5",
|
|
"JOB_TIMEOUT": "60s",
|
|
"JWT_ACCESS_TOKEN_LIFETIME": "15m",
|
|
"MAX_IMAGE_PIXELS": "40000000",
|
|
"MAX_UPLOAD_BYTES": "10485760",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:9443",
|
|
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
|
|
"OTEL_SDK_DISABLED": "true",
|
|
"POSTGRES_CONNECT_TIMEOUT": "500ms",
|
|
"POSTGRES_DATABASE": "messenger",
|
|
"POSTGRES_HOST": "postgres",
|
|
"POSTGRES_MAX_CONNECTIONS": "16",
|
|
"POSTGRES_PORT": 5432,
|
|
"POSTGRES_QUERY_TIMEOUT": "2s",
|
|
"POSTGRES_RUN_MIGRATIONS": "false",
|
|
"POSTGRES_USER": "messenger",
|
|
"POSTGRES_VERSION_TABLE": "versions",
|
|
"RECONCILE_GRACE_PERIOD": "1h",
|
|
"REDIS_DB": 0,
|
|
"REDIS_HOST": "redis",
|
|
"REDIS_PORT": "6380",
|
|
"REDIS_USERNAME": "api",
|
|
"S3_BUCKET": "messenger-attachments",
|
|
"S3_ENDPOINT": "https://s3:9443",
|
|
"S3_REGION": "us-east-1",
|
|
"SESSION_TTL_SECONDS": "3600",
|
|
"STAGING_RETENTION": "24h",
|
|
"UPLOAD_TIMEOUT": "120s",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"WORKER_PREFETCH": "2",
|
|
"TLS_REQUIRED": "true",
|
|
"JWT_PRIVATE_KEY_PATH": "/run/identity/jwt.key",
|
|
"JWT_PUBLIC_KEY_PATH": "/run/identity/jwt.pub",
|
|
"BAO_ADDR": "",
|
|
"SERVICE_ROLE": "api",
|
|
"ARGON2_MEMORY_KIB": "65536",
|
|
"ARGON2_ITERATIONS": "3",
|
|
"ARGON2_PARALLELISM": "1",
|
|
"POSTGRES_PASSWORD_FILE": "/run/dbpassword",
|
|
"S3_ACCESS_KEY_ID_FILE": "/run/identity/s3_admin_access",
|
|
"S3_SECRET_ACCESS_KEY_FILE": "/run/identity/s3_admin_secret"
|
|
},
|
|
"volumes": [
|
|
"./secrets/lab7/operator-client:/run/identity:ro",
|
|
"./secrets/lab7/postgres/password:/run/dbpassword:ro",
|
|
"./tests/fixtures:/fixtures:ro"
|
|
],
|
|
"networks": [
|
|
"default"
|
|
],
|
|
"read_only": true,
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"tmpfs": [
|
|
"/tmp:size=256m,mode=1777",
|
|
"/run/credentials:uid=65532,gid=65532,mode=0700,size=1m"
|
|
],
|
|
"stop_grace_period": "10s",
|
|
"deploy": {},
|
|
"healthcheck": {
|
|
"disable": true
|
|
},
|
|
"command": [
|
|
"storage",
|
|
"reconcile"
|
|
],
|
|
"profiles": [
|
|
"tools"
|
|
]
|
|
},
|
|
"lb": {
|
|
"image": "haproxy:3.2-alpine@sha256:96ec3c75a9264ba94e733eeacb44051ed6e7b79bb77a73c2c36f236b6423f1f0",
|
|
"restart": "unless-stopped",
|
|
"cpus": 0.5,
|
|
"mem_limit": "128m",
|
|
"ports": [
|
|
"127.0.0.1:8443:8443"
|
|
],
|
|
"volumes": [
|
|
"./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro",
|
|
"./secrets/lab7/lb:/run/identity:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"networks": [
|
|
"default",
|
|
"ingress"
|
|
]
|
|
},
|
|
"postgres": {
|
|
"image": "postgres:17.11-alpine3.23@sha256:05aa77262db9277fde6374bb2f901c9604b8a9373029e1a7993440c6aae48736",
|
|
"restart": "unless-stopped",
|
|
"cpus": 2,
|
|
"mem_limit": "1g",
|
|
"environment": {
|
|
"POSTGRES_USER": "messenger",
|
|
"POSTGRES_DB": "messenger",
|
|
"POSTGRES_PASSWORD_FILE": "/run/identity/password"
|
|
},
|
|
"volumes": [
|
|
"postgres_data:/var/lib/postgresql/data",
|
|
"./secrets/lab7/postgres:/run/identity:ro",
|
|
"./secrets/lab7/postgres/init.sql:/docker-entrypoint-initdb.d/roles.sql:ro",
|
|
"./infra/postgres/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro"
|
|
],
|
|
"command": [
|
|
"sh",
|
|
"-c",
|
|
"cp /run/identity/tls.key /tmp/server.key && chown postgres /tmp/server.key && chmod 600 /tmp/server.key && exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/run/identity/tls.crt -c ssl_key_file=/tmp/server.key -c hba_file=/etc/postgresql/pg_hba.conf"
|
|
],
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD",
|
|
"pg_isready",
|
|
"-U",
|
|
"messenger",
|
|
"-d",
|
|
"messenger"
|
|
],
|
|
"interval": "2s",
|
|
"timeout": "2s",
|
|
"retries": 30
|
|
},
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"redis": {
|
|
"image": "redis:8.2.11-alpine3.22@sha256:489a769e0a54dc245896132a15c72d2bc7296719954da99398f43a3877e5f8eb",
|
|
"restart": "unless-stopped",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"redis-server",
|
|
"--port",
|
|
"0",
|
|
"--tls-port",
|
|
"6380",
|
|
"--tls-cert-file",
|
|
"/run/identity/tls.crt",
|
|
"--tls-key-file",
|
|
"/run/identity/tls.key",
|
|
"--tls-ca-cert-file",
|
|
"/run/identity/ca.crt",
|
|
"--tls-auth-clients",
|
|
"no",
|
|
"--aclfile",
|
|
"/run/identity/users.acl",
|
|
"--appendonly",
|
|
"yes",
|
|
"--maxmemory",
|
|
"64mb",
|
|
"--maxmemory-policy",
|
|
"noeviction"
|
|
],
|
|
"volumes": [
|
|
"redis_data:/data",
|
|
"./secrets/lab7/redis:/run/identity:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"broker": {
|
|
"image": "rabbitmq:4.2.0-alpine@sha256:32962eea9bf99928c2fc541a7defb78c7feca9df0434c5dfb7b539d61e1af524",
|
|
"hostname": "broker",
|
|
"restart": "unless-stopped",
|
|
"cpus": 0.5,
|
|
"mem_limit": "512m",
|
|
"volumes": [
|
|
"broker_data:/var/lib/rabbitmq",
|
|
"./secrets/lab7/broker:/run/identity:ro",
|
|
"./infra/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro",
|
|
"./infra/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro",
|
|
"./infra/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json:ro"
|
|
],
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD",
|
|
"rabbitmq-diagnostics",
|
|
"-q",
|
|
"check_running"
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 30
|
|
},
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"s3": {
|
|
"image": "chrislusf/seaweedfs:4.52@sha256:57877e32bb90073b37dc109b438ba66e84fd5ed9ced5f5c04f56444ef243ce59",
|
|
"restart": "unless-stopped",
|
|
"cpus": 1,
|
|
"mem_limit": "512m",
|
|
"command": [
|
|
"server",
|
|
"-dir=/data",
|
|
"-ip=127.0.0.1",
|
|
"-ip.bind=127.0.0.1",
|
|
"-volume.max=16",
|
|
"-master.volumeSizeLimitMB=1024",
|
|
"-filer",
|
|
"-s3",
|
|
"-s3.port=9000",
|
|
"-s3.config=/run/identity/s3.json"
|
|
],
|
|
"volumes": [
|
|
"s3_data:/data",
|
|
"./secrets/lab7/s3:/run/identity:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"otel-collector": {
|
|
"command": [
|
|
"--config=/etc/otelcol/config.yaml"
|
|
],
|
|
"cpus": 0.5,
|
|
"image": "otel/opentelemetry-collector-contrib:0.140.0",
|
|
"mem_limit": "256m",
|
|
"restart": "unless-stopped",
|
|
"volumes": [
|
|
"./secrets/lab7/otel-collector:/run/identity:ro",
|
|
"./infra/otel/collector.yaml:/etc/otelcol/config.yaml:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=64m"
|
|
]
|
|
},
|
|
"prometheus": {
|
|
"command": [
|
|
"--config.file=/etc/prometheus/prometheus.yaml",
|
|
"--storage.tsdb.retention.time=7d",
|
|
"--storage.tsdb.retention.size=1GB",
|
|
"--web.listen-address=127.0.0.1:9090"
|
|
],
|
|
"cpus": 0.5,
|
|
"image": "prom/prometheus:v3.16.0",
|
|
"mem_limit": "384m",
|
|
"restart": "unless-stopped",
|
|
"volumes": [
|
|
{
|
|
"source": "prometheus_data",
|
|
"target": "/prometheus",
|
|
"type": "volume",
|
|
"volume": {}
|
|
},
|
|
"./secrets/lab7/prometheus:/run/identity:ro",
|
|
"./infra/otel/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro",
|
|
"./infra/otel/alerts.yaml:/etc/prometheus/alerts.yaml:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=64m"
|
|
]
|
|
},
|
|
"loki": {
|
|
"command": [
|
|
"-config.file=/etc/loki/config.yaml"
|
|
],
|
|
"cpus": 0.5,
|
|
"image": "grafana/loki:3.7.10",
|
|
"mem_limit": "384m",
|
|
"restart": "unless-stopped",
|
|
"volumes": [
|
|
{
|
|
"source": "loki_data",
|
|
"target": "/loki",
|
|
"type": "volume",
|
|
"volume": {}
|
|
},
|
|
"./secrets/lab7/loki:/run/identity:ro",
|
|
"./infra/otel/loki.yaml:/etc/loki/config.yaml:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=64m"
|
|
]
|
|
},
|
|
"tempo": {
|
|
"command": [
|
|
"-config.file=/etc/tempo.yaml"
|
|
],
|
|
"cpus": 0.5,
|
|
"image": "grafana/tempo:2.9.0",
|
|
"mem_limit": "384m",
|
|
"restart": "unless-stopped",
|
|
"volumes": [
|
|
{
|
|
"source": "tempo_data",
|
|
"target": "/var/tempo",
|
|
"type": "volume",
|
|
"volume": {}
|
|
},
|
|
"./secrets/lab7/tempo:/run/identity:ro",
|
|
"./infra/otel/tempo.yaml:/etc/tempo.yaml:ro"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=64m"
|
|
]
|
|
},
|
|
"grafana": {
|
|
"cpus": 0.5,
|
|
"environment": {
|
|
"GF_ANALYTICS_CHECK_FOR_UPDATES": "false",
|
|
"GF_ANALYTICS_REPORTING_ENABLED": "false",
|
|
"GF_AUTH_ANONYMOUS_ENABLED": "false",
|
|
"GF_SECURITY_ADMIN_PASSWORD__FILE": "/run/identity/password",
|
|
"GF_SERVER_PROTOCOL": "https",
|
|
"GF_SERVER_CERT_FILE": "/run/identity/tls.crt",
|
|
"GF_SERVER_CERT_KEY": "/run/identity/tls.key"
|
|
},
|
|
"image": "grafana/grafana:13.3.1",
|
|
"mem_limit": "384m",
|
|
"restart": "unless-stopped",
|
|
"volumes": [
|
|
{
|
|
"source": "grafana_data",
|
|
"target": "/var/lib/grafana",
|
|
"type": "volume",
|
|
"volume": {}
|
|
},
|
|
"./secrets/lab7/grafana:/run/identity:ro",
|
|
"./infra/otel/dashboards:/var/lib/grafana/dashboards:ro",
|
|
"./infra/otel/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro",
|
|
"./secrets/lab7/grafana/datasources.yaml:/etc/grafana/provisioning/datasources/default.yaml:ro"
|
|
],
|
|
"ports": [
|
|
"127.0.0.1:13443:3000"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"networks": [
|
|
"default",
|
|
"ingress"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=64m"
|
|
]
|
|
},
|
|
"s3-tls": {
|
|
"image": "envoyproxy/envoy:v1.36.4",
|
|
"restart": "unless-stopped",
|
|
"network_mode": "service:s3",
|
|
"depends_on": {
|
|
"s3": {
|
|
"condition": "service_started"
|
|
}
|
|
},
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"envoy",
|
|
"-c",
|
|
"/etc/envoy/config.json",
|
|
"--concurrency",
|
|
"1",
|
|
"--log-level",
|
|
"warn"
|
|
],
|
|
"volumes": [
|
|
"./secrets/lab7/s3:/run/identity:ro",
|
|
"./infra/envoy/s3.json:/etc/envoy/config.json:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"otel-collector-tls": {
|
|
"image": "envoyproxy/envoy:v1.36.4",
|
|
"restart": "unless-stopped",
|
|
"network_mode": "service:otel-collector",
|
|
"depends_on": {
|
|
"otel-collector": {
|
|
"condition": "service_started"
|
|
}
|
|
},
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"envoy",
|
|
"-c",
|
|
"/etc/envoy/config.json",
|
|
"--concurrency",
|
|
"1",
|
|
"--log-level",
|
|
"warn"
|
|
],
|
|
"volumes": [
|
|
"./secrets/lab7/otel-collector:/run/identity:ro",
|
|
"./infra/envoy/otel-collector.json:/etc/envoy/config.json:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"prometheus-tls": {
|
|
"image": "envoyproxy/envoy:v1.36.4",
|
|
"restart": "unless-stopped",
|
|
"network_mode": "service:prometheus",
|
|
"depends_on": {
|
|
"prometheus": {
|
|
"condition": "service_started"
|
|
}
|
|
},
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"envoy",
|
|
"-c",
|
|
"/etc/envoy/config.json",
|
|
"--concurrency",
|
|
"1",
|
|
"--log-level",
|
|
"warn"
|
|
],
|
|
"volumes": [
|
|
"./secrets/lab7/prometheus:/run/identity:ro",
|
|
"./infra/envoy/prometheus.json:/etc/envoy/config.json:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"loki-tls": {
|
|
"image": "envoyproxy/envoy:v1.36.4",
|
|
"restart": "unless-stopped",
|
|
"network_mode": "service:loki",
|
|
"depends_on": {
|
|
"loki": {
|
|
"condition": "service_started"
|
|
}
|
|
},
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"envoy",
|
|
"-c",
|
|
"/etc/envoy/config.json",
|
|
"--concurrency",
|
|
"1",
|
|
"--log-level",
|
|
"warn"
|
|
],
|
|
"volumes": [
|
|
"./secrets/lab7/loki:/run/identity:ro",
|
|
"./infra/envoy/loki.json:/etc/envoy/config.json:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"tempo-tls": {
|
|
"image": "envoyproxy/envoy:v1.36.4",
|
|
"restart": "unless-stopped",
|
|
"network_mode": "service:tempo",
|
|
"depends_on": {
|
|
"tempo": {
|
|
"condition": "service_started"
|
|
}
|
|
},
|
|
"user": "65532:65532",
|
|
"cpus": 0.25,
|
|
"mem_limit": "128m",
|
|
"command": [
|
|
"envoy",
|
|
"-c",
|
|
"/etc/envoy/config.json",
|
|
"--concurrency",
|
|
"1",
|
|
"--log-level",
|
|
"warn"
|
|
],
|
|
"volumes": [
|
|
"./secrets/lab7/tempo:/run/identity:ro",
|
|
"./infra/envoy/tempo.json:/etc/envoy/config.json:ro"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"openbao": {
|
|
"image": "openbao/openbao:2.4.4",
|
|
"restart": "unless-stopped",
|
|
"user": "100:1000",
|
|
"cpus": 0.5,
|
|
"mem_limit": "256m",
|
|
"command": [
|
|
"server",
|
|
"-config=/etc/openbao/server.hcl"
|
|
],
|
|
"environment": {
|
|
"BAO_ADDR": "https://localhost:8200",
|
|
"BAO_CACERT": "/run/identity/ca.crt"
|
|
},
|
|
"ports": [
|
|
"127.0.0.1:18200:8200"
|
|
],
|
|
"volumes": [
|
|
"bao_data:/openbao/data",
|
|
"./secrets/lab7/openbao:/run/identity:ro",
|
|
"./infra/openbao/server.hcl:/etc/openbao/server.hcl:ro"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"entrypoint": [
|
|
"bao"
|
|
],
|
|
"networks": [
|
|
"default",
|
|
"ingress"
|
|
],
|
|
"read_only": true,
|
|
"tmpfs": [
|
|
"/tmp:mode=1777,size=16m"
|
|
]
|
|
},
|
|
"bao-permissions": {
|
|
"image": "openbao/openbao:2.4.4",
|
|
"profiles": [
|
|
"tools"
|
|
],
|
|
"user": "0:0",
|
|
"entrypoint": [
|
|
"chown"
|
|
],
|
|
"command": [
|
|
"-R",
|
|
"100:1000",
|
|
"/openbao/data"
|
|
],
|
|
"volumes": [
|
|
"bao_data:/openbao/data"
|
|
],
|
|
"network_mode": "none",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"cap_add": [
|
|
"CHOWN",
|
|
"DAC_OVERRIDE"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cpus": 0.25,
|
|
"mem_limit": "32m",
|
|
"restart": "no"
|
|
}
|
|
},
|
|
"volumes": {
|
|
"postgres_data": {},
|
|
"redis_data": {},
|
|
"broker_data": {},
|
|
"s3_data": {},
|
|
"bao_data": {},
|
|
"prometheus_data": {},
|
|
"loki_data": {},
|
|
"tempo_data": {},
|
|
"grafana_data": {}
|
|
},
|
|
"networks": {
|
|
"default": {
|
|
"internal": true
|
|
},
|
|
"ingress": {}
|
|
}
|
|
}
|