{ "name": "mtuci-vp7-security", "services": { "lb": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private", "edge" ], "volumes": [ { "type": "bind", "source": "./.local/pki/lb", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/lb.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ], "ports": [ "127.0.0.1:${HTTPS_PORT:-18443}:8443" ] }, "api1-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/api1-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/api1-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/pki/api", "target": "/client-pki", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "api2-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/api2-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/api2-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/pki/api", "target": "/client-pki", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "broker-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/broker-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/broker-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "s3-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/s3-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/s3-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "collector-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/collector-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/collector-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/pki/collector", "target": "/client-pki", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "openobserve-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/openobserve-gateway", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/openobserve-gateway.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "grafana-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private", "edge" ], "volumes": [ { "type": "bind", "source": "./.local/pki/grafana", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/grafana.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ], "ports": [ "127.0.0.1:${GRAFANA_PORT:-18447}:3443" ] }, "worker-gateway": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "128m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "haproxy:3.2-alpine@sha256:1c3568e520453cc8ba98c39501febcf450429c80e6cc27ecad779961d76e597c", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/worker", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/worker.cfg", "target": "/usr/local/etc/haproxy/haproxy.cfg", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg" ] }, "postgres": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 1, "mem_limit": "512m", "tmpfs": [ "/run/tls:size=1048576,mode=0755", "/var/run/postgresql:size=1048576,mode=0777", "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336", "pull_policy": "never", "cap_add": [ "CHOWN", "DAC_OVERRIDE", "FOWNER", "SETGID", "SETUID" ], "networks": [ "private" ], "environment": { "POSTGRES_USER": "operator", "POSTGRES_DB": "messenger", "POSTGRES_PASSWORD_FILE": "/bootstrap/db-password" }, "volumes": [ { "type": "bind", "source": "./.local/data/postgres", "target": "/var/lib/postgresql", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/pki/postgres", "target": "/source-tls", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/operator/db-password", "target": "/bootstrap/db-password", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./config/pg_hba.conf", "target": "/config/pg_hba.conf", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./scripts/postgres-entrypoint.sh", "target": "/config/entrypoint.sh", "read_only": true, "bind": { "create_host_path": false } } ], "entrypoint": [ "/bin/sh", "/config/entrypoint.sh" ], "healthcheck": { "test": [ "CMD-SHELL", "pg_isready -U operator -d messenger" ], "interval": "2s", "timeout": "2s", "retries": 30 } }, "broker": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "256m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "valkey/valkey:9@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:broker-gateway", "volumes": [ { "type": "bind", "source": "./.local/data/broker", "target": "/data", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/config/valkey.conf", "target": "/config/valkey.conf", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/config/users.acl", "target": "/config/users.acl", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "valkey-server", "/config/valkey.conf" ] }, "s3": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 1, "mem_limit": "512m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "rustfs/rustfs:1.0.0-rc.1@sha256:f53d700fc16809070326f6ab3fb565d48e722364a7bd5a12e47d0a5abe079ce6", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:s3-gateway", "volumes": [ { "type": "bind", "source": "./.local/data/s3", "target": "/data", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/data/s3-logs", "target": "/logs", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/config/s3.env", "target": "/config/s3.env", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./scripts/s3-entrypoint.sh", "target": "/config/entrypoint.sh", "read_only": true, "bind": { "create_host_path": false } } ], "entrypoint": [ "/bin/sh", "/config/entrypoint.sh" ] }, "openbao": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "256m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "openbao/openbao:2.7.2@sha256:a78eb12a9fc7a3ebb4bec1724e2bdd6a28e33394820641d061166919a3f1866b", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "networks": [ "private", "edge" ], "ports": [ "127.0.0.1:${BAO_PORT:-18445}:8200" ], "volumes": [ { "type": "bind", "source": "./.local/pki/openbao", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/data/bao", "target": "/bao/data", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/openbao/server.hcl", "target": "/bao/config/server.hcl", "read_only": true, "bind": { "create_host_path": false } } ], "environment": { "BAO_ADDR": "https://openbao:8200", "BAO_CACERT": "/pki/ca.crt", "SKIP_SETCAP": "true" }, "entrypoint": [ "bao" ], "command": [ "server", "-config=/bao/config/server.hcl" ], "healthcheck": { "test": [ "CMD", "bao", "status", "-format=json" ], "interval": "2s", "timeout": "2s", "retries": 30 } }, "api1-agent": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "96m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "openbao/openbao:2.7.2@sha256:a78eb12a9fc7a3ebb4bec1724e2bdd6a28e33394820641d061166919a3f1866b", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:api1-gateway", "volumes": [ { "type": "bind", "source": "./.local/pki/api", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/openbao/api-agent.hcl", "target": "/config/agent.hcl", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/rendered/api1", "target": "/run/app", "bind": { "create_host_path": false } } ], "environment": { "SKIP_SETCAP": "true" }, "entrypoint": [ "bao" ], "command": [ "agent", "-config=/config/agent.hcl" ], "depends_on": { "openbao": { "condition": "service_healthy" } }, "healthcheck": { "test": [ "CMD-SHELL", "test -s /run/app/database_url && test -s /run/app/cache_url && test -s /run/app/s3.json && test -s /run/app/freshness" ], "interval": "2s", "timeout": "1s", "retries": 30 } }, "api1": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "2048m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "mtuci-vp7-security-app:local", "pull_policy": "never", "build": { "context": ".", "dockerfile": "Dockerfile" }, "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:api1-gateway", "volumes": [ { "type": "bind", "source": "./.local/rendered/api1", "target": "/run/app", "read_only": true, "bind": { "create_host_path": false } } ], "environment": { "APP_HOST": "127.0.0.1", "APP_PORT": "8080", "APP_ENV": "lab", "DATABASE_URL_FILE": "/run/app/database_url", "CACHE_URL_FILE": "/run/app/cache_url", "S3_CONFIG_FILE": "/run/app/s3.json", "SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}", "OTEL_EXPORTER_OTLP_ENDPOINT": "http://127.0.0.1:14318", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf", "OTEL_SERVICE_NAME": "messenger-api", "OTEL_RESOURCE_ATTRIBUTES": "deployment.environment.name=lab", "PG_MAX_CONNS": "4", "WORKER_MAX_ATTEMPTS": "5", "SECRET_FRESHNESS_FILE": "/run/app/freshness", "SECRET_MAX_AGE_SECONDS": "120", "GOMEMLIMIT": "1536MiB" }, "depends_on": { "api1-agent": { "condition": "service_healthy" } }, "command": [ "/app" ], "stop_grace_period": "15s" }, "api2-agent": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "96m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "openbao/openbao:2.7.2@sha256:a78eb12a9fc7a3ebb4bec1724e2bdd6a28e33394820641d061166919a3f1866b", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:api2-gateway", "volumes": [ { "type": "bind", "source": "./.local/pki/api", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/openbao/api-agent.hcl", "target": "/config/agent.hcl", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/rendered/api2", "target": "/run/app", "bind": { "create_host_path": false } } ], "environment": { "SKIP_SETCAP": "true" }, "entrypoint": [ "bao" ], "command": [ "agent", "-config=/config/agent.hcl" ], "depends_on": { "openbao": { "condition": "service_healthy" } }, "healthcheck": { "test": [ "CMD-SHELL", "test -s /run/app/database_url && test -s /run/app/cache_url && test -s /run/app/s3.json && test -s /run/app/freshness" ], "interval": "2s", "timeout": "1s", "retries": 30 } }, "api2": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "2048m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "mtuci-vp7-security-app:local", "pull_policy": "never", "build": { "context": ".", "dockerfile": "Dockerfile" }, "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:api2-gateway", "volumes": [ { "type": "bind", "source": "./.local/rendered/api2", "target": "/run/app", "read_only": true, "bind": { "create_host_path": false } } ], "environment": { "APP_HOST": "127.0.0.1", "APP_PORT": "8080", "APP_ENV": "lab", "DATABASE_URL_FILE": "/run/app/database_url", "CACHE_URL_FILE": "/run/app/cache_url", "S3_CONFIG_FILE": "/run/app/s3.json", "SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}", "OTEL_EXPORTER_OTLP_ENDPOINT": "http://127.0.0.1:14318", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf", "OTEL_SERVICE_NAME": "messenger-api", "OTEL_RESOURCE_ATTRIBUTES": "deployment.environment.name=lab", "PG_MAX_CONNS": "4", "WORKER_MAX_ATTEMPTS": "5", "SECRET_FRESHNESS_FILE": "/run/app/freshness", "SECRET_MAX_AGE_SECONDS": "120", "GOMEMLIMIT": "1536MiB" }, "depends_on": { "api2-agent": { "condition": "service_healthy" } }, "command": [ "/app" ], "stop_grace_period": "15s" }, "worker-agent": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "96m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "openbao/openbao:2.7.2@sha256:a78eb12a9fc7a3ebb4bec1724e2bdd6a28e33394820641d061166919a3f1866b", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:worker-gateway", "volumes": [ { "type": "bind", "source": "./.local/pki/worker", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/openbao/worker-agent.hcl", "target": "/config/agent.hcl", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/rendered/worker", "target": "/run/app", "bind": { "create_host_path": false } } ], "environment": { "SKIP_SETCAP": "true" }, "entrypoint": [ "bao" ], "command": [ "agent", "-config=/config/agent.hcl" ], "depends_on": { "openbao": { "condition": "service_healthy" } }, "healthcheck": { "test": [ "CMD-SHELL", "test -s /run/app/database_url && test -s /run/app/cache_url && test -s /run/app/s3.json && test -s /run/app/freshness && test -s /run/app/publisher_url" ], "interval": "2s", "timeout": "1s", "retries": 30 } }, "worker": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 1, "mem_limit": "2048m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "mtuci-vp7-security-app:local", "pull_policy": "never", "build": { "context": ".", "dockerfile": "Dockerfile" }, "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:worker-gateway", "volumes": [ { "type": "bind", "source": "./.local/rendered/worker", "target": "/run/app", "read_only": true, "bind": { "create_host_path": false } } ], "environment": { "APP_HOST": "127.0.0.1", "APP_PORT": "8080", "APP_ENV": "lab", "DATABASE_URL_FILE": "/run/app/database_url", "CACHE_URL_FILE": "/run/app/cache_url", "S3_CONFIG_FILE": "/run/app/s3.json", "SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}", "OTEL_EXPORTER_OTLP_ENDPOINT": "http://127.0.0.1:14318", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf", "OTEL_SERVICE_NAME": "messenger-worker", "OTEL_RESOURCE_ATTRIBUTES": "deployment.environment.name=lab", "PG_MAX_CONNS": "4", "WORKER_MAX_ATTEMPTS": "5", "SECRET_FRESHNESS_FILE": "/run/app/freshness", "SECRET_MAX_AGE_SECONDS": "120", "GOMEMLIMIT": "1536MiB", "BROKER_PUBLISH_URL_FILE": "/run/app/publisher_url" }, "depends_on": { "worker-agent": { "condition": "service_healthy" } }, "command": [ "/worker" ], "stop_grace_period": "15s" }, "collector": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "256m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "${VP7_COLLECTOR_IMAGE:-otel/opentelemetry-collector-k8s:0.163.2@sha256:a65df9129a5b3f99ee4434c5e53aee1965ff0129eda6a2da75ea917165b7fa6b}", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:collector-gateway", "volumes": [ { "type": "bind", "source": "./infra/otel/collector.yaml", "target": "/etc/otelcol/config.yaml", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/data/collector", "target": "/data", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/config/openobserve_ingest_auth", "target": "/run/secrets/openobserve_ingest_auth", "read_only": true, "bind": { "create_host_path": false } } ], "command": [ "--config=/etc/otelcol/config.yaml" ] }, "openobserve": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 1, "mem_limit": "1024m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "${VP7_OPENOBSERVE_IMAGE:-public.ecr.aws/zinclabs/openobserve:v1.1.2@sha256:26618f379c86b253c0d91624c487dd14b71293699845ecbc8457c94dca14819f}", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:openobserve-gateway", "environment": { "ZO_LOCAL_MODE": "true", "ZO_LOCAL_MODE_STORAGE": "disk", "ZO_DATA_DIR": "/data/", "ZO_HTTP_ADDR": "127.0.0.1", "ZO_HTTP_PORT": "15080", "ZO_GRPC_ADDR": "127.0.0.1", "ZO_TELEMETRY": "false", "ZO_MEMORY_CACHE_ENABLED": "false", "ZO_MEM_TABLE_MAX_SIZE": "128", "ZO_MAX_FILE_SIZE_IN_MEMORY": "16", "ZO_MEMORY_CACHE_DATAFUSION_MAX_SIZE": "256", "ZO_QUERY_TIMEOUT": "8", "ZO_HTTP_WORKER_NUM": "2", "ZO_SERVICE_ACCOUNT_ENABLED": "true" }, "env_file": [ "./.local/config/openobserve.env" ], "volumes": [ { "type": "bind", "source": "./.local/data/openobserve", "target": "/data", "bind": { "create_host_path": false } } ] }, "grafana": { "restart": "unless-stopped", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "256m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "${VP7_GRAFANA_IMAGE:-grafana/grafana@sha256:1c88285f1dd391a62232c010e6c224846e6a73bdc583b3365be2eba614b7919e}", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "network_mode": "service:grafana-gateway", "environment": { "GF_SERVER_HTTP_ADDR": "127.0.0.1", "GF_SERVER_HTTP_PORT": "3000", "GF_AUTH_ANONYMOUS_ENABLED": "false", "GF_USERS_ALLOW_SIGN_UP": "false", "GF_SECURITY_ADMIN_USER": "operator", "GF_SECURITY_ADMIN_PASSWORD__FILE": "/run/admin/password", "GF_SECURITY_SECRET_KEY__FILE": "/run/admin/secret-key", "GF_SECURITY_COOKIE_SECURE": "true", "GF_ANALYTICS_REPORTING_ENABLED": "false", "GF_ANALYTICS_CHECK_FOR_UPDATES": "false", "GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES": "false", "GF_LOG_MODE": "console", "GF_LOG_LEVEL": "warn", "GF_DATAPROXY_TIMEOUT": "10", "GF_DATAPROXY_RESPONSE_LIMIT": "8388608", "GF_DATAPROXY_MAX_CONNS_PER_HOST": "8", "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS": "openobserve", "GF_PLUGINS_PREINSTALL_DISABLED": "true", "GF_PLUGINS_PUBLIC_KEY_RETRIEVAL_DISABLED": "true" }, "env_file": [ "./.local/config/grafana-query.env" ], "volumes": [ { "type": "bind", "source": "./.local/data/grafana", "target": "/var/lib/grafana", "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/operator/grafana-password", "target": "/run/admin/password", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/operator/grafana-secret-key", "target": "/run/admin/secret-key", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/grafana/provisioning", "target": "/etc/grafana/provisioning", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./infra/grafana/dashboards", "target": "/var/lib/grafana/dashboards", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/plugins", "target": "/var/lib/grafana/plugins", "read_only": true, "bind": { "create_host_path": false } } ] }, "migrate": { "restart": "no", "read_only": true, "cap_drop": [ "ALL" ], "security_opt": [ "no-new-privileges:true" ], "pids_limit": 128, "cpu_shares": 128, "cpus": 0.5, "mem_limit": "256m", "tmpfs": [ "/tmp:size=16777216,mode=1777" ], "logging": { "driver": "json-file", "options": { "max-size": "2m", "max-file": "2" } }, "image": "mtuci-vp7-security-app:local", "pull_policy": "never", "user": "${LOCAL_UID:?run bootstrap}:${LOCAL_GID:?run bootstrap}", "profiles": [ "tools" ], "networks": [ "private" ], "volumes": [ { "type": "bind", "source": "./.local/pki/operator", "target": "/pki", "read_only": true, "bind": { "create_host_path": false } }, { "type": "bind", "source": "./.local/operator/migration-url", "target": "/run/operator/database_url", "read_only": true, "bind": { "create_host_path": false } } ], "environment": { "DATABASE_URL_FILE": "/run/operator/database_url" }, "command": [ "/app", "-migrate" ] } }, "networks": { "private": { "internal": true }, "edge": { "internal": false } } }