services: sms-forwarder: build: . container_name: sms-forwarder ports: - "12152:12152" volumes: - ./config.yaml:/app/config.yaml:ro - ./logs:/app/logs - ./data:/app/data environment: - CONFIG_PATH=/app/config.yaml restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:12152/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s deploy: resources: limits: memory: 256M cpus: '0.5' reservations: memory: 128M cpus: '0.1' # 可选:添加 Gotify 服务作为推送后端 gotify: image: gotify/server container_name: gotify ports: - "24545:80" volumes: - ./gotify_data:/app/data environment: - GOTIFY_DEFAULTUSER_PASS=admin restart: unless-stopped profiles: - gotify