Files
nwxraybot/docker-compose.yml
Sergey Elpashev cd9b456765
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Hotfix: postgres pg_isready healthcheck fix
2025-01-20 14:36:06 +03:00

42 lines
894 B
YAML

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: