add level 3
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Матвей
2026-11-07 22:00:19 +03:00
parent 7b6c10cde9
commit 9cb708335d
14 changed files with 482 additions and 22 deletions
+29
View File
@@ -1,4 +1,5 @@
x-api: &api
group_add: ["${LAB_SECRET_GID:-65534}"]
build:
context: .
cap_drop: [ALL]
@@ -63,6 +64,7 @@ x-api: &api
services:
openbao:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: openbao/openbao:2.3.2
user: "0:0"
entrypoint: ["bao"]
@@ -83,6 +85,7 @@ services:
cpus: "0.50"
broker:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: rabbitmq:4.1.2-alpine
hostname: broker
extra_hosts: ["broker:127.0.0.1"]
@@ -115,6 +118,7 @@ services:
memory: 256M
broker-tcp:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:broker
depends_on:
@@ -127,6 +131,7 @@ services:
cpus: "0.25"
s3:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: chrislusf/seaweedfs:4.17@sha256:186de7ef977a20343ee9a5544073f081976a29e2d29ecf8379891e7bf177fbe9
command: ["server", "-dir=/data", "-ip=127.0.0.1", "-ip.bind=127.0.0.1", "-s3", "-s3.port=18333", "-s3.config=/run/secrets/s3_config", "-s3.cert.file=/run/secrets/s3_tls", "-s3.key.file=/run/secrets/s3_tls", "-master.volumeSizeLimitMB=128", "-volume.max=64", "-s3.port.iceberg=0", "-filer.exposeDirectoryData=false"]
secrets:
@@ -148,6 +153,7 @@ services:
memory: 512M
s3-tcp:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:s3
depends_on:
@@ -166,6 +172,7 @@ services:
cpus: "0.25"
s3-init:
group_add: ["${LAB_SECRET_GID:-65534}"]
build:
context: .
command: ["/app/.venv/bin/python", "-m", "src.bootstrap_s3"]
@@ -187,6 +194,7 @@ services:
cpus: "0.50"
postgres:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: postgres:17.6-alpine
entrypoint: ["/bin/sh", "/usr/local/bin/postgres-tls-entrypoint.sh"]
command: ["postgres", "-c", "track_commit_timestamp=on", "-c", "ssl=on", "-c", "ssl_cert_file=/tmp/postgres-tls/server.pem", "-c", "ssl_key_file=/tmp/postgres-tls/server.pem", "-c", "hba_file=/etc/postgresql/pg_hba.conf"]
@@ -214,6 +222,7 @@ services:
memory: 512M
migrate:
group_add: ["${LAB_SECRET_GID:-65534}"]
build:
context: .
command: ["/app/.venv/bin/python", "-m", "src.migrate"]
@@ -236,6 +245,7 @@ services:
memory: 128M
db-provision:
group_add: ["${LAB_SECRET_GID:-65534}"]
build:
context: .
command: ["/app/.venv/bin/python", "-m", "src.provision_db_roles"]
@@ -254,6 +264,7 @@ services:
cpus: "0.25"
reconcile:
group_add: ["${LAB_SECRET_GID:-65534}"]
healthcheck:
disable: true
build:
@@ -278,6 +289,8 @@ services:
- s3_reconcile_access_key_id
- s3_reconcile_secret_access_key
depends_on:
db-provision:
condition: service_completed_successfully
postgres:
condition: service_healthy
s3:
@@ -297,6 +310,7 @@ services:
<<: *api
api-a-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:api-a
depends_on:
@@ -311,6 +325,7 @@ services:
cpus: "0.25"
api-b-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:api-b
depends_on:
@@ -325,6 +340,7 @@ services:
cpus: "0.25"
worker:
group_add: ["${LAB_SECRET_GID:-65534}"]
restart: unless-stopped
cap_drop: [ALL]
security_opt: [no-new-privileges:true]
@@ -384,6 +400,7 @@ services:
stop_grace_period: 30s
outbox:
group_add: ["${LAB_SECRET_GID:-65534}"]
mem_limit: 256m
cpus: "0.50"
cap_drop: [ALL]
@@ -414,6 +431,8 @@ services:
- broker_outbox_url
- otel_outbox_cert
depends_on:
db-provision:
condition: service_completed_successfully
migrate:
condition: service_completed_successfully
broker:
@@ -423,6 +442,7 @@ services:
restart: unless-stopped
load_balancer:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
ports:
- "127.0.0.1:${PUBLIC_HTTPS_PORT:-8443}:8443"
@@ -453,6 +473,7 @@ services:
memory: 128M
otel-collector:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: otel/opentelemetry-collector-contrib:0.120.0
command: ["--config=/etc/otelcol/config.yaml"]
volumes:
@@ -462,6 +483,7 @@ services:
cpus: "0.50"
restart: unless-stopped
otel-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:otel-collector
depends_on: [otel-collector]
@@ -473,6 +495,7 @@ services:
mem_limit: 128m
cpus: "0.25"
prometheus:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: prom/prometheus:v3.2.1
mem_limit: 512m
cpus: "0.50"
@@ -484,6 +507,7 @@ services:
- prometheus_data:/prometheus
restart: unless-stopped
prometheus-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:prometheus
depends_on: [prometheus]
@@ -495,6 +519,7 @@ services:
mem_limit: 128m
cpus: "0.25"
loki:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: grafana/loki:3.4.2
mem_limit: 512m
cpus: "0.50"
@@ -504,6 +529,7 @@ services:
- loki_data:/loki
restart: unless-stopped
loki-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:loki
depends_on: [loki]
@@ -515,6 +541,7 @@ services:
mem_limit: 128m
cpus: "0.25"
tempo:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: grafana/tempo:2.7.1
mem_limit: 512m
cpus: "0.50"
@@ -524,6 +551,7 @@ services:
- tempo_data:/var/tempo
restart: unless-stopped
tempo-tls:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: haproxy:3.0.11-alpine
network_mode: service:tempo
depends_on: [tempo]
@@ -535,6 +563,7 @@ services:
mem_limit: 128m
cpus: "0.25"
grafana:
group_add: ["${LAB_SECRET_GID:-65534}"]
image: grafana/grafana:11.5.2
mem_limit: 512m
cpus: "0.50"