44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
yaltipia-telegram-bot:
|
|
build: .
|
|
container_name: yaltipia-telegram-bot
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=production
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
# Persist user data
|
|
- ./src/data:/app/src/data
|
|
# Mount logs directory (optional)
|
|
- ./logs:/app/logs
|
|
networks:
|
|
- yaltipia-network
|
|
depends_on:
|
|
- backend-api
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "console.log('Bot is running')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Optional: If you want to run your backend API in the same compose
|
|
backend-api:
|
|
# Replace with your backend image or build context
|
|
image: your-backend-api:latest
|
|
container_name: yaltipia-backend-api
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
networks:
|
|
- yaltipia-network
|
|
# Add your backend-specific configuration here
|
|
|
|
networks:
|
|
yaltipia-network:
|
|
driver: bridge |