services: bot: image: nwxraybot:latest restart: always container_name: nwxraybot_bot build: context: . dockerfile: Dockerfile networks: - bot_network depends_on: db: condition: service_healthy restart: true db: image: postgres:17-alpine container_name: nwxraybot_db restart: always environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_DB: ${POSTGRES_DB:-postgres} ports: - "127.0.0.1:${POSTGRES_PORT}:5432" healthcheck: test: ["CMD", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] interval: 10s timeout: 5s retries: 10 networks: - bot_network volumes: - postgres_data:/var/lib/postgresql/data networks: bot_network: volumes: postgres_data: