723 lines
18 KiB
YAML
723 lines
18 KiB
YAML
{
|
|
"name": "mtusi-lab7",
|
|
"services": {
|
|
"api1": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5,
|
|
"pids_limit": 128,
|
|
"environment": {
|
|
"SERVICE_ROLE": "api",
|
|
"APP_PORT": "8443",
|
|
"SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}",
|
|
"S3_ENDPOINT": "https://s3:9000",
|
|
"OTEL_SERVICE_NAME": "messenger-api",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:3443",
|
|
"NODE_EXTRA_CA_CERTS": "/tls/ca.crt",
|
|
"OTEL_PROPAGATORS": "tracecontext"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/api1.crt:/tls/cert.crt:ro",
|
|
"./certs/api1.key:/tls/key.pem:ro"
|
|
],
|
|
"restart": "on-failure",
|
|
"depends_on": {
|
|
"db": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"broker": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"s3": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"node -e \"fetch('http://127.0.0.1:9001/health/ready').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
}
|
|
},
|
|
"api2": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5,
|
|
"pids_limit": 128,
|
|
"environment": {
|
|
"SERVICE_ROLE": "api",
|
|
"APP_PORT": "8443",
|
|
"SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}",
|
|
"S3_ENDPOINT": "https://s3:9000",
|
|
"OTEL_SERVICE_NAME": "messenger-api",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:3443",
|
|
"NODE_EXTRA_CA_CERTS": "/tls/ca.crt",
|
|
"OTEL_PROPAGATORS": "tracecontext"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/api2.crt:/tls/cert.crt:ro",
|
|
"./certs/api2.key:/tls/key.pem:ro"
|
|
],
|
|
"restart": "on-failure",
|
|
"depends_on": {
|
|
"db": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"broker": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"s3": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"node -e \"fetch('http://127.0.0.1:9001/health/ready').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
}
|
|
},
|
|
"worker": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5,
|
|
"pids_limit": 128,
|
|
"environment": {
|
|
"SERVICE_ROLE": "worker",
|
|
"APP_PORT": "8443",
|
|
"SESSION_TTL_SECONDS": "${SESSION_TTL_SECONDS:-3600}",
|
|
"S3_ENDPOINT": "https://s3:9000",
|
|
"OTEL_SERVICE_NAME": "messenger-worker",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:3443",
|
|
"NODE_EXTRA_CA_CERTS": "/tls/ca.crt",
|
|
"OTEL_PROPAGATORS": "tracecontext"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/worker.crt:/tls/cert.crt:ro",
|
|
"./certs/worker.key:/tls/key.pem:ro"
|
|
],
|
|
"restart": "on-failure",
|
|
"depends_on": {
|
|
"db": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"broker": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"s3": {
|
|
"condition": "service_healthy"
|
|
}
|
|
}
|
|
},
|
|
"db": {
|
|
"image": "postgres:17.6-alpine",
|
|
"environment": {
|
|
"POSTGRES_DB": "messenger",
|
|
"POSTGRES_USER": "messenger",
|
|
"POSTGRES_PASSWORD_FILE": "/run/secrets/postgres_password"
|
|
},
|
|
"secrets": [
|
|
"postgres_password"
|
|
],
|
|
"volumes": [
|
|
"pgdata:/var/lib/postgresql/data",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/db.crt:/tls/cert.crt:ro",
|
|
"./certs/db.key:/tls/key.pem:ro",
|
|
"./secrets/roles.sql:/docker-entrypoint-initdb.d/roles.sql:ro",
|
|
"./secrets/pg_hba.conf:/etc/postgresql/pg_hba.conf:ro"
|
|
],
|
|
"command": [
|
|
"sh",
|
|
"-c",
|
|
"cp /tls/key.pem /tmp/server.key && chown postgres:postgres /tmp/server.key && chmod 600 /tmp/server.key && exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/tls/cert.crt -c ssl_key_file=/tmp/server.key -c hba_file=/etc/postgresql/pg_hba.conf"
|
|
],
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"pg_isready -U messenger -d messenger"
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
},
|
|
"mem_limit": "512m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"migrate": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5,
|
|
"pids_limit": 128,
|
|
"command": [
|
|
"node",
|
|
"src/migrate.js"
|
|
],
|
|
"environment": {
|
|
"DATABASE_URL_FILE": "/run/secrets/database_url"
|
|
},
|
|
"secrets": [
|
|
"database_url"
|
|
],
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/api1.crt:/tls/cert.crt:ro",
|
|
"./certs/api1.key:/tls/key.pem:ro"
|
|
],
|
|
"depends_on": {
|
|
"db": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"restart": "no"
|
|
},
|
|
"s3": {
|
|
"image": "mtusi-minio:RELEASE.2025-04-22T22-12-26Z",
|
|
"build": {
|
|
"context": ".",
|
|
"dockerfile": "infra/Dockerfile.s3"
|
|
},
|
|
"command": [
|
|
"server",
|
|
"/data",
|
|
"--certs-dir",
|
|
"/certificates",
|
|
"--console-address",
|
|
"127.0.0.1:9001"
|
|
],
|
|
"environment": {
|
|
"MINIO_ROOT_USER_FILE": "/run/secrets/s3_admin_user",
|
|
"MINIO_ROOT_PASSWORD_FILE": "/run/secrets/s3_admin_password"
|
|
},
|
|
"secrets": [
|
|
"s3_admin_user",
|
|
"s3_admin_password"
|
|
],
|
|
"volumes": [
|
|
"s3data:/data",
|
|
"./certs/s3.crt:/certificates/public.crt:ro",
|
|
"./certs/s3.key:/certificates/private.key:ro",
|
|
"./certs/ca.crt:/tls/ca.crt:ro"
|
|
],
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"curl --cacert /tls/ca.crt -f https://s3:9000/minio/health/live"
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
},
|
|
"mem_limit": "768m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"s3-init": {
|
|
"image": "mtusi-mc:2025-04-16",
|
|
"entrypoint": [
|
|
"/bin/sh",
|
|
"/config/s3-init.sh"
|
|
],
|
|
"volumes": [
|
|
"./certs/ca.crt:/root/.mc/certs/CAs/ca.crt:ro",
|
|
"./secrets/s3-init.sh:/config/s3-init.sh:ro",
|
|
"./secrets/s3-api.json:/config/s3-api.json:ro",
|
|
"./secrets/s3-worker.json:/config/s3-worker.json:ro"
|
|
],
|
|
"depends_on": {
|
|
"s3": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"restart": "no",
|
|
"mem_limit": "128m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"build": {
|
|
"context": ".",
|
|
"dockerfile": "infra/Dockerfile.mc"
|
|
}
|
|
},
|
|
"broker": {
|
|
"image": "rabbitmq:4.1.0-alpine",
|
|
"hostname": "broker",
|
|
"volumes": [
|
|
"brokerdata:/var/lib/rabbitmq",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/broker.crt:/tls/cert.crt:ro",
|
|
"./certs/broker.key:/tls/key.pem:ro",
|
|
"./secrets/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro",
|
|
"./secrets/rabbit-definitions.json:/etc/rabbitmq/definitions.json:ro",
|
|
"./infra/rabbit-enabled-plugins:/etc/rabbitmq/enabled_plugins:ro"
|
|
],
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"rabbitmq-diagnostics -q ping"
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
},
|
|
"mem_limit": "512m",
|
|
"environment": {
|
|
"RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS": "+S 2:2"
|
|
},
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"lb": {
|
|
"image": "haproxy:3.0.12-alpine",
|
|
"ports": [
|
|
"127.0.0.1:${APP_PORT:-8443}:8443"
|
|
],
|
|
"volumes": [
|
|
"./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/lb.pem:/tls/server.pem:ro",
|
|
"./certs/lb.pem:/tls/client.pem:ro"
|
|
],
|
|
"depends_on": {
|
|
"api1": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"api2": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"mem_limit": "128m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"bao": {
|
|
"image": "openbao/openbao:2.2.2",
|
|
"command": [
|
|
"server",
|
|
"-config=/bao/config/config.hcl"
|
|
],
|
|
"volumes": [
|
|
"baodata:/openbao/file",
|
|
"./infra/openbao/config.hcl:/bao/config/config.hcl:ro",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/bao.crt:/tls/cert.crt:ro",
|
|
"./certs/bao.key:/tls/key.pem:ro"
|
|
],
|
|
"ports": [
|
|
"127.0.0.1:8207:8200"
|
|
],
|
|
"environment": {
|
|
"BAO_ADDR": "https://bao:8200",
|
|
"BAO_CACERT": "/tls/ca.crt"
|
|
},
|
|
"mem_limit": "256m",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"cap_add": [
|
|
"CHOWN",
|
|
"SETUID",
|
|
"SETGID"
|
|
]
|
|
},
|
|
"otel-collector": {
|
|
"image": "otel/opentelemetry-collector-contrib:0.123.0",
|
|
"command": [
|
|
"--config=/etc/otelcol/config.yaml"
|
|
],
|
|
"volumes": [
|
|
"./infra/otel/collector.yaml:/etc/otelcol/config.yaml:ro",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/collector.crt:/tls/cert.crt:ro",
|
|
"./certs/collector.key:/tls/key.pem:ro"
|
|
],
|
|
"mem_limit": "256m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"prometheus": {
|
|
"image": "prom/prometheus:v3.2.1",
|
|
"command": [
|
|
"--config.file=/etc/prometheus/prometheus.yml",
|
|
"--storage.tsdb.path=/prometheus",
|
|
"--storage.tsdb.retention.time=3d",
|
|
"--web.listen-address=127.0.0.1:9090"
|
|
],
|
|
"volumes": [
|
|
"./infra/otel/prometheus.yaml:/etc/prometheus/prometheus.yml:ro",
|
|
"prometheusdata:/prometheus",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/prometheus.crt:/tls/cert.crt:ro",
|
|
"./certs/prometheus.key:/tls/key.pem:ro"
|
|
],
|
|
"mem_limit": "256m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"loki": {
|
|
"image": "grafana/loki:3.4.2",
|
|
"command": [
|
|
"-config.file=/etc/loki/config.yaml"
|
|
],
|
|
"volumes": [
|
|
"./infra/otel/loki.yaml:/etc/loki/config.yaml:ro",
|
|
"lokidata:/loki"
|
|
],
|
|
"mem_limit": "256m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"tempo": {
|
|
"image": "grafana/tempo:2.7.2",
|
|
"user": "0:0",
|
|
"command": [
|
|
"-config.file=/etc/tempo/config.yaml"
|
|
],
|
|
"volumes": [
|
|
"./infra/otel/tempo.yaml:/etc/tempo/config.yaml:ro",
|
|
"tempodata:/var/tempo"
|
|
],
|
|
"mem_limit": "256m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"otel-collector-tls": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "96m",
|
|
"cpus": 0.5,
|
|
"pids_limit": 128,
|
|
"command": [
|
|
"node",
|
|
"src/tls-proxy.js"
|
|
],
|
|
"network_mode": "service:otel-collector",
|
|
"environment": {
|
|
"PROXY_MODE": "collector"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/collector.crt:/tls/cert.crt:ro",
|
|
"./certs/collector.key:/tls/key.pem:ro"
|
|
],
|
|
"depends_on": [
|
|
"otel-collector"
|
|
]
|
|
},
|
|
"prometheus-tls": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "96m",
|
|
"cpus": 0.5,
|
|
"pids_limit": 128,
|
|
"command": [
|
|
"node",
|
|
"src/tls-proxy.js"
|
|
],
|
|
"network_mode": "service:prometheus",
|
|
"environment": {
|
|
"PROXY_MODE": "prometheus"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/prometheus.crt:/tls/cert.crt:ro",
|
|
"./certs/prometheus.key:/tls/key.pem:ro"
|
|
],
|
|
"depends_on": [
|
|
"prometheus"
|
|
]
|
|
},
|
|
"loki-tls": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "96m",
|
|
"cpus": 0.5,
|
|
"pids_limit": 128,
|
|
"command": [
|
|
"node",
|
|
"src/tls-proxy.js"
|
|
],
|
|
"network_mode": "service:loki",
|
|
"environment": {
|
|
"PROXY_MODE": "loki"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/loki.crt:/tls/cert.crt:ro",
|
|
"./certs/loki.key:/tls/key.pem:ro"
|
|
],
|
|
"depends_on": [
|
|
"loki"
|
|
]
|
|
},
|
|
"tempo-tls": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "96m",
|
|
"cpus": 0.5,
|
|
"pids_limit": 128,
|
|
"command": [
|
|
"node",
|
|
"src/tls-proxy.js"
|
|
],
|
|
"network_mode": "service:tempo",
|
|
"environment": {
|
|
"PROXY_MODE": "tempo"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/tempo.crt:/tls/cert.crt:ro",
|
|
"./certs/tempo.key:/tls/key.pem:ro"
|
|
],
|
|
"depends_on": [
|
|
"tempo"
|
|
]
|
|
},
|
|
"grafana": {
|
|
"image": "grafana/grafana:11.6.0",
|
|
"environment": {
|
|
"GF_SERVER_PROTOCOL": "https",
|
|
"GF_SERVER_CERT_FILE": "/tls/cert.crt",
|
|
"GF_SERVER_CERT_KEY": "/tls/key.pem",
|
|
"GF_AUTH_ANONYMOUS_ENABLED": "false",
|
|
"GF_SECURITY_ADMIN_PASSWORD__FILE": "/run/secrets/grafana_password",
|
|
"GF_ANALYTICS_REPORTING_ENABLED": "false",
|
|
"GF_ANALYTICS_CHECK_FOR_UPDATES": "false"
|
|
},
|
|
"secrets": [
|
|
"grafana_password"
|
|
],
|
|
"volumes": [
|
|
"grafanadata:/var/lib/grafana",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/grafana.crt:/tls/cert.crt:ro",
|
|
"./certs/grafana.key:/tls/key.pem:ro",
|
|
"./secrets/datasources.yaml:/etc/grafana/provisioning/datasources/sources.yaml:ro",
|
|
"./infra/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro",
|
|
"./infra/grafana/dashboards:/var/lib/grafana/dashboards:ro"
|
|
],
|
|
"ports": [
|
|
"127.0.0.1:${GRAFANA_PORT:-3447}:3000"
|
|
],
|
|
"mem_limit": "384m",
|
|
"cpus": 1,
|
|
"pids_limit": 256,
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
]
|
|
},
|
|
"checks": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"user": "1000:1000",
|
|
"profiles": [
|
|
"test"
|
|
],
|
|
"command": [
|
|
"node",
|
|
"/tests/security.js"
|
|
],
|
|
"environment": {
|
|
"NODE_PATH": "/app/node_modules"
|
|
},
|
|
"volumes": [
|
|
"./student-tests:/tests:ro",
|
|
"./certs:/test-certs:ro",
|
|
"./evidence:/evidence",
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/operator.crt:/tls/cert.crt:ro",
|
|
"./certs/operator.key:/tls/key.pem:ro",
|
|
"./tests/fixtures:/fixtures:ro"
|
|
],
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5
|
|
},
|
|
"expiry": {
|
|
"image": "mtusi-messenger:lab7",
|
|
"build": ".",
|
|
"user": "1000:1000",
|
|
"cap_drop": [
|
|
"ALL"
|
|
],
|
|
"security_opt": [
|
|
"no-new-privileges:true"
|
|
],
|
|
"mem_limit": "512m",
|
|
"cpus": 1.5,
|
|
"pids_limit": 128,
|
|
"environment": {
|
|
"SERVICE_ROLE": "api",
|
|
"APP_PORT": "8443",
|
|
"SESSION_TTL_SECONDS": "2",
|
|
"S3_ENDPOINT": "https://s3:9000",
|
|
"OTEL_SERVICE_NAME": "messenger-api",
|
|
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector:3443",
|
|
"NODE_EXTRA_CA_CERTS": "/tls/ca.crt",
|
|
"OTEL_PROPAGATORS": "tracecontext"
|
|
},
|
|
"volumes": [
|
|
"./certs/ca.crt:/tls/ca.crt:ro",
|
|
"./certs/api1.crt:/tls/cert.crt:ro",
|
|
"./certs/api1.key:/tls/key.pem:ro"
|
|
],
|
|
"restart": "no",
|
|
"depends_on": {
|
|
"db": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"broker": {
|
|
"condition": "service_healthy"
|
|
},
|
|
"s3": {
|
|
"condition": "service_healthy"
|
|
}
|
|
},
|
|
"healthcheck": {
|
|
"test": [
|
|
"CMD-SHELL",
|
|
"node -e \"fetch('http://127.0.0.1:9001/health/ready').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""
|
|
],
|
|
"interval": "3s",
|
|
"timeout": "5s",
|
|
"retries": 40
|
|
},
|
|
"profiles": [
|
|
"test"
|
|
]
|
|
}
|
|
},
|
|
"volumes": {
|
|
"pgdata": null,
|
|
"s3data": null,
|
|
"brokerdata": null,
|
|
"baodata": null,
|
|
"prometheusdata": null,
|
|
"lokidata": null,
|
|
"tempodata": null,
|
|
"grafanadata": null
|
|
},
|
|
"secrets": {
|
|
"postgres_password": {
|
|
"file": "./secrets/postgres_password"
|
|
},
|
|
"database_url": {
|
|
"file": "./secrets/database_url"
|
|
},
|
|
"s3_admin_user": {
|
|
"file": "./secrets/s3_admin_user"
|
|
},
|
|
"s3_admin_password": {
|
|
"file": "./secrets/s3_admin_password"
|
|
},
|
|
"grafana_password": {
|
|
"file": "./secrets/grafana_password"
|
|
}
|
|
}
|
|
}
|