Files
madbase/deploy/hetzner/server4.compose.yml
Vlad Durnea a66d908eff
Some checks failed
CI / podman-build (push) Has been cancelled
CI / rust (push) Has been cancelled
chore: full stack stability and migration fixes, plus react UI progress
2026-03-18 09:01:38 +02:00

97 lines
2.7 KiB
YAML

# MadBase - Server 4: Pillar Node 3 (DB Replica + Worker)
services:
etcd3:
image: quay.io/coreos/etcd:v3.5.9
container_name: madbase_etcd3
environment:
- ETCD_NAME=etcd3
- ETCD_DATA_DIR=/etcd-data
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://${SERVER4_IP}:2380
- ETCD_ADVERTISE_CLIENT_URLS=http://${SERVER4_IP}:2379
- ETCD_INITIAL_CLUSTER_TOKEN=madbase-autobase
- ETCD_INITIAL_CLUSTER=etcd1=http://${SERVER2_IP}:2380,etcd2=http://${SERVER3_IP}:2380,etcd3=http://${SERVER4_IP}:2380
- ETCD_INITIAL_CLUSTER_STATE=new
volumes:
- etcd3_data:/etcd-data
restart: unless-stopped
networks:
- madbase_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
patroni3:
image: registry.gitlab.com/postgres-ai/postgresql-autobase/patroni:3.0.2
container_name: madbase_patroni3
environment:
- PATRONI_SCOPE=madbase-cluster
- PATRONI_NAME=patroni3
- PATRONI_ETCD3_HOSTS=${SERVER2_IP}:2379,${SERVER3_IP}:2379,${SERVER4_IP}:2379
- PATRONI_POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD}
- PATRONI_RESTAPI_LISTEN=0.0.0.0:8008
- PATRONI_RESTAPI_CONNECT_ADDRESS=${SERVER4_IP}:8008
- PATRONI_POSTGRESQL_LISTEN=0.0.0.0:5432
- PATRONI_POSTGRESQL_CONNECT_ADDRESS=${SERVER4_IP}:5432
volumes:
- db_data:/var/lib/postgresql/data
depends_on:
- etcd3
restart: unless-stopped
networks:
- madbase_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
worker3:
image: git.madapes.com/madbase/worker:latest
container_name: madbase_worker3
restart: unless-stopped
ports:
- "8002:8002"
env_file: .env
environment:
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@localhost:5433/postgres
- CONTROL_DB_URL=postgres://admin:${CONTROL_DB_PASSWORD}@localhost:5433/madbase_control
- REDIS_URL=redis://${SERVER3_IP}:6379
networks:
- madbase_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
haproxy:
image: haproxy:2.8-alpine
container_name: madbase_haproxy_v3
volumes:
- ./autobase-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- "5433:5433"
depends_on:
- patroni3
restart: unless-stopped
networks:
- madbase_net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
etcd3_data:
db_data:
networks:
madbase_net:
name: madbase_net
external: true