forked from mtusi2026/mtusi2026lab7
Развести стенд с соседними лабораторными и починить хранилища.
Seaweed без TLS остаётся во внутренней сети, Grafana и S3 публикуются на свободных портах, а sidecar брокера поднимается заново после рестарта RabbitMQ.
This commit is contained in:
+16
-19
@@ -77,9 +77,6 @@ services:
|
||||
image: rabbitmq:3.13.7-alpine
|
||||
hostname: rabbitmq
|
||||
entrypoint: ["/bin/sh", "/entrypoint.sh"]
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: messenger_api
|
||||
RABBITMQ_DEFAULT_PASS_FILE: /run/secrets/rabbit_api_password
|
||||
volumes:
|
||||
- rabbitmq_data:/var/lib/rabbitmq
|
||||
- ./infra/rabbitmq/entrypoint.sh:/entrypoint.sh:ro
|
||||
@@ -122,13 +119,11 @@ services:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
|
||||
s3:
|
||||
seaweed:
|
||||
image: chrislusf/seaweedfs:3.85
|
||||
entrypoint: ["/bin/sh", "/seaweed-entrypoint.sh"]
|
||||
environment:
|
||||
S3_BUCKET: ${S3_BUCKET:-messenger-attachments}
|
||||
ports:
|
||||
- "127.0.0.1:9000:9000"
|
||||
volumes:
|
||||
- s3_data:/data
|
||||
- ./infra/s3/seaweed-entrypoint.sh:/seaweed-entrypoint.sh:ro
|
||||
@@ -150,17 +145,18 @@ services:
|
||||
cpus: "0.50"
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks: [data]
|
||||
networks: [s3internal]
|
||||
|
||||
s3-tls:
|
||||
s3:
|
||||
image: haproxy:3.1.7-alpine
|
||||
network_mode: service:s3
|
||||
depends_on:
|
||||
s3:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- ./infra/haproxy-s3.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
- ./certs/s3.pem:/certs/s3.pem:ro
|
||||
ports:
|
||||
- "127.0.0.1:9007:9000"
|
||||
depends_on:
|
||||
seaweed:
|
||||
condition: service_started
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp:rw,nosuid,size=16m
|
||||
@@ -170,9 +166,11 @@ services:
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
restart: unless-stopped
|
||||
networks: [data, s3internal]
|
||||
|
||||
openbao:
|
||||
image: openbao/openbao:2.2.0
|
||||
user: "0"
|
||||
entrypoint: ["bao"]
|
||||
command: ["server", "-config=/openbao/config/openbao.hcl"]
|
||||
volumes:
|
||||
@@ -182,7 +180,7 @@ services:
|
||||
- ./certs/openbao.key:/certs/openbao.key:ro
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "bao", "status", "-address=https://127.0.0.1:8200", "-ca-cert=/certs/ca.crt"]
|
||||
test: ["CMD-SHELL", "BAO_ADDR=https://127.0.0.1:8200 BAO_CACERT=/certs/ca.crt bao status"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 40
|
||||
@@ -190,8 +188,6 @@ services:
|
||||
restart: unless-stopped
|
||||
mem_limit: 256m
|
||||
cpus: "0.50"
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks: [data]
|
||||
@@ -274,9 +270,9 @@ services:
|
||||
- ./certs/ca.crt:/certs/ca.crt:ro
|
||||
depends_on:
|
||||
s3:
|
||||
condition: service_healthy
|
||||
s3-tls:
|
||||
condition: service_started
|
||||
seaweed:
|
||||
condition: service_healthy
|
||||
restart: "no"
|
||||
networks: [data]
|
||||
|
||||
@@ -308,7 +304,7 @@ services:
|
||||
S3_ENDPOINT: https://s3:9000
|
||||
S3_REGION: ${S3_REGION:-us-east-1}
|
||||
S3_BUCKET: ${S3_BUCKET:-messenger-attachments}
|
||||
S3_PUBLIC_ENDPOINT: ${S3_PUBLIC_ENDPOINT:-https://127.0.0.1:9000}
|
||||
S3_PUBLIC_ENDPOINT: ${S3_PUBLIC_ENDPOINT:-https://127.0.0.1:9007}
|
||||
PRESIGN_TTL_SECONDS: ${PRESIGN_TTL_SECONDS:-60}
|
||||
MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-10485760}
|
||||
MAX_IMAGE_PIXELS: ${MAX_IMAGE_PIXELS:-40000000}
|
||||
@@ -575,7 +571,7 @@ services:
|
||||
GF_SERVER_CERT_KEY: /certs/grafana.key
|
||||
SSL_CERT_FILE: /certs/ca.crt
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
- "127.0.0.1:3007:3000"
|
||||
volumes:
|
||||
- ./infra/grafana/entrypoint.sh:/entrypoint.sh:ro
|
||||
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
@@ -643,6 +639,7 @@ networks:
|
||||
data:
|
||||
signals:
|
||||
telemetry:
|
||||
s3internal:
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
|
||||
Reference in New Issue
Block a user