Files
nwxraybot/docker-compose.yml
Sergey Elpashev b909c77180
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Feat: move from stack to compose
2024-12-28 09:50:57 +03:00

41 lines
811 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:
- 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:
volumes:
postgres_data: