-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 921 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
services:
youtube-telegram-bot:
build: .
container_name: yt-telegram-bot
restart: unless-stopped
environment:
- PYTHONUNBUFFERED=1
env_file:
- .env
volumes:
# Mount data directory to persist bot data
- ./Pydata:/app/Pydata
# Optional: Mount logs directory
- ./logs:/app/logs
networks:
- bot-network
# Optional: CPU and memory limits
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.1'
memory: 128M
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('https://api.telegram.org', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
bot-network:
driver: bridge
# Optional: Create volumes for persistent data
volumes:
bot-data:
driver: local