Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
# MadBase - Pillar: DB / State
|
|
# High-Availability PostgreSQL Cluster (Autobase)
|
|
|
|
services:
|
|
etcd:
|
|
image: quay.io/coreos/etcd:v3.5.9
|
|
container_name: madbase_etcd
|
|
environment:
|
|
- ETCD_INITIAL_CLUSTER_TOKEN=madbase-autobase
|
|
- ETCD_INITIAL_CLUSTER_STATE=new
|
|
volumes:
|
|
- etcd_data:/etcd-data
|
|
restart: unless-stopped
|
|
|
|
patroni:
|
|
image: registry.gitlab.com/postgres-ai/postgresql-autobase/patroni:3.0.2
|
|
container_name: madbase_patroni
|
|
environment:
|
|
- PATRONI_SCOPE=madbase-cluster
|
|
- PATRONI_ETCD3_HOSTS=etcd:2379
|
|
- PATRONI_POSTGRESQL_PASSWORD=${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
depends_on:
|
|
- etcd
|
|
restart: unless-stopped
|
|
|
|
haproxy:
|
|
image: haproxy:2.8-alpine
|
|
container_name: madbase_haproxy
|
|
volumes:
|
|
- ./autobase-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
|
ports:
|
|
- "5432:5433"
|
|
- "6379:6379"
|
|
depends_on:
|
|
- patroni
|
|
- redis
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: madbase_redis
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
etcd_data:
|
|
db_data:
|
|
redis_data:
|