Поднять стенд из двух реплик за HAProxy с приватным MinIO S3

Dockerfile (python:3.11, waitress), compose: api1/api2 + postgres +
migrate + s3 (pinned minio, без опубликованных портов) + s3-bootstrap +
lb (haproxy, round-robin, healthcheck на /health/ready). Секреты DATABASE_URL
и S3 — через Docker secrets, локальная инициализация — scripts/init_local.py.
This commit is contained in:
2026-11-17 03:37:34 +00:00
parent c9e24a0b45
commit e594df18f9
7 changed files with 227 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
global
log stdout format raw local0
maxconn 256
defaults
log global
mode http
option dontlognull
timeout connect 1s
timeout client 10s
timeout server 10s
timeout check 1s
timeout http-request 10s
timeout http-keep-alive 2s
# No transparent replay of POSTs. The client owns retry + Idempotency-Key.
retries 0
resolvers docker
nameserver dns 127.0.0.11:53
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold valid 2s
hold nx 1s
hold other 1s
hold refused 1s
hold timeout 1s
hold obsolete 1s
frontend public
bind :8080
default_backend messenger
backend messenger
balance roundrobin
option httpchk
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host messenger
http-check expect status 200
default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 1
server api1 api1:8080 check resolvers docker resolve-prefer ipv4 init-addr libc,none
server api2 api2:8080 check resolvers docker resolve-prefer ipv4 init-addr libc,none