services: bot: image: nwxraybot:latest deploy: replicas: 1 restart_policy: condition: on-failure networks: - bot_network depends_on: - db db: image: postgres:17-alpine deploy: replicas: 1 restart_policy: condition: on-failure environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_DB: ${POSTGRES_DB:-postgres} ports: - 5432 healthcheck: test: ["CMD", "pg_isready"] interval: 10s timeout: 5s retries: 10 networks: - bot_network volumes: - postgres_data:/var/lib/postgresql/data networks: bot_network: driver: overlay volumes: postgres_data: