Files
tg_post_min/docker-compose.yml
2025-08-20 21:10:31 +09:00

29 lines
604 B
YAML

version: "3.9"
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-tg_poster}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 10
bot:
build: .
depends_on:
db:
condition: service_healthy
env_file: .env
restart: unless-stopped
volumes:
pgdata: