version: '3.8' services: postbird: build: . ports: - "8080:8080" environment: - HOST=0.0.0.0 - PORT=8080 - DB_DRIVER=sqlite - DB_DSN=/app/data/postbird.db?_journal_mode=WAL - WORKER_COUNT=10 - QUEUE_BUFFER_SIZE=10000 volumes: - postbird_data:/app/data restart: unless-stopped healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 3s retries: 3 start_period: 5s # Optional: Prometheus for metrics prometheus: image: prom/prometheus:latest ports: - "9090:9090" volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro - prometheus_data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' restart: unless-stopped profiles: - monitoring # Optional: Grafana for dashboards grafana: image: grafana/grafana:latest ports: - "3000:3000" environment: - GF_SECURITY_ADMIN_PASSWORD=admin - GF_USERS_ALLOW_SIGN_UP=false volumes: - grafana_data:/var/lib/grafana restart: unless-stopped profiles: - monitoring volumes: postbird_data: prometheus_data: grafana_data: