Files
tg_tinder_bot/docker-compose.yml
2025-09-18 14:19:49 +09:00

67 lines
1.4 KiB
YAML

version: '3.8'
services:
bot:
build: .
container_name: telegram-tinder-bot
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file: .env
environment:
- NODE_ENV=production
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=telegram_tinder_bot
- DB_USERNAME=postgres
volumes:
- ./uploads:/app/uploads
- ./logs:/app/logs
networks:
- bot-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
db:
image: postgres:15-alpine
container_name: postgres-tinder
restart: unless-stopped
environment:
- POSTGRES_DB=telegram_tinder_bot
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${DB_PASSWORD:-password123}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5433:5432"
networks:
- bot-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
adminer:
image: adminer:latest
container_name: adminer-tinder
restart: unless-stopped
ports:
- "8080:8080"
depends_on:
- db
networks:
- bot-network
volumes:
postgres_data:
networks:
bot-network:
driver: bridge