id: worker-monitor-combo name: Worker + Monitoring Combo description: Worker node with local VictoriaMetrics and Loki for smaller deployments version: 1.0 min_hetzner_plan: CX21 estimated_monthly_cost: 6.94 services: - id: worker name: MadBase Worker image: madbase/worker:latest ports: ["8002:8002"] environment: WORKER_PORT: 8002 DATABASE_URL: ${DATABASE_URL} REDIS_URL: ${REDIS_URL} 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 - id: victoria name: VictoriaMetrics image: victoriametrics/victoria-metrics:latest ports: ["8428:8428"] volumes: - vm_data:/victoria-metrics-data resource_profile: balanced - id: loki name: Loki image: grafana/loki:latest ports: ["3100:3100"] volumes: - loki_data:/loki resource_profile: balanced - id: vmagent name: VictoriaMetrics Agent image: victoriametrics/vmagent:latest ports: ["8429:8429"] command: ["--promscrape.config=/etc/vmagent/prometheus.yml", "--remoteWrite.url=http://localhost:8428/api/v1/write"] volumes: - ./config/vmagent.yml:/etc/vmagent/prometheus.yml:ro resource_profile: minimal - id: promtail name: Promtail image: grafana/promtail:latest volumes: - /var/log:/var/log:ro - ./config/promtail.yml:/etc/promtail/config.yml:ro resource_profile: minimal requirements: min_nodes: 1 max_nodes: 3 supports_ha: true recommended_deployment: "For 2-3 server deployments with monitoring on worker node" notes: | VictoriaMetrics and Loki run on the same node as worker. Other workers can send metrics/logs to this node. Upgrade to dedicated monitoring node when: - Worker CPU > 60% (monitoring competes for resources) - Need to scale workers horizontally