wip:milestone 0 fixes
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

This commit is contained in:
2026-03-15 12:35:42 +02:00
parent 6708cf28a7
commit cffdf8af86
61266 changed files with 4511646 additions and 1938 deletions

View File

@@ -0,0 +1,101 @@
id: worker-db-combo
name: Worker + Database Combo
description: Combined worker and database node for smaller deployments (2-3 servers)
version: 1.0
min_hetzner_plan: CX31
estimated_monthly_cost: 14.21
services:
- id: postgresql
name: PostgreSQL
image: registry.gitlab.com/postgres-ai/postgresql-autobase/patroni:3.0.2
ports: ["5432:5432", "8008:8008"]
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: madbase
PATRONI_SCOPE: madbase-cluster
PATRONI_NAME: node1
PATRONI_RESTAPI_LISTEN: 0.0.0.0:8008
PATRONI_POSTGRESQL_LISTEN: 0.0.0.0:5432
PATRONI_POSTGRESQL_DATA_DIR: /var/lib/postgresql/data
PATRONI_ETCD3_HOSTS: http://localhost:2379
volumes:
- postgres_data:/var/lib/postgresql/data
resource_profile: balanced
- id: etcd
name: etcd
image: quay.io/coreos/etcd:v3.5.9
ports: ["2379:2379", "2380:2380"]
environment:
ETCD_NAME: node1
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://localhost:2380
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://localhost:2379
ETCD_INITIAL_CLUSTER: node1=http://localhost:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: madbase-etcd
volumes:
- etcd_data:/etcd-data
resource_profile: minimal
- id: haproxy
name: HAProxy
image: haproxy:2.8-alpine
ports: ["5433:5433"]
volumes:
- ./config/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
resource_profile: minimal
depends_on:
- postgresql
- id: worker
name: MadBase Worker
image: madbase/worker:latest
ports: ["8002:8002"]
environment:
WORKER_PORT: 8002
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5433/madbase
REDIS_URL: redis://${REDIS_HOST}:6379
S3_ENDPOINT: ${S3_ENDPOINT}
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
S3_BUCKET: ${S3_BUCKET}
S3_REGION: ${S3_REGION}
resource_profile: cpu_intensive
depends_on:
- postgresql
- id: vmagent
name: VictoriaMetrics Agent
image: victoriametrics/vmagent:latest
ports: ["8429:8429"]
command: ["--promscrape.config=/etc/vmagent/prometheus.yml", "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"]
volumes:
- ./config/vmagent.yml:/etc/vmagent/prometheus.yml:ro
resource_profile: minimal
requirements:
min_nodes: 1
max_nodes: 2
supports_ha: true
recommended_deployment: "2-3 servers: 1x worker-db-combo + 1x control-plane + optional monitoring node"
scaling:
can_add_workers: true
can_split_database: true
upgrade_path: "Migrate to dedicated db-node.yaml + worker-node.yaml when load increases"
resource_profiles:
minimal:
cpu_limit: "0.5"
memory_limit: "512Mi"
balanced:
cpu_limit: "2"
memory_limit: "2Gi"
cpu_intensive:
cpu_limit: "4"
memory_limit: "4Gi"