-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (49 loc) · 1.42 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (49 loc) · 1.42 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: '3.8'
services:
atbot:
build:
context: .
dockerfile: Dockerfile
container_name: atbot
restart: unless-stopped
environment:
# Required: Discord bot token
DISCORD_TOKEN: ${DISCORD_TOKEN:-}
# Required: DeepL API key
DEEPL_API_KEY: ${DEEPL_API_KEY:-}
# Optional: bot config name to use
ATBOT_CONFIG: ${ATBOT_CONFIG:-default}
# Optional: skip token verification for faster startup
ATBOT_SKIP_VERIFY: ${ATBOT_SKIP_VERIFY:-0}
volumes:
# Persist configuration file
- ./config.ini:/app/Files/config.ini
# Persist logs
- ./logs:/app/Files/logs
# Persist dashboard state (optional)
- ./dashboard_state.json:/app/Files/dashboard_state.json
# Optional: expose if bot has any web interface (currently not used)
# ports:
# - "8000:8000"
# Resource limits (optional, adjust as needed)
deploy:
resources:
limits:
cpus: '2'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
# Healthcheck
healthcheck:
test: ["CMD", "python", "-c", "import os; exit(0 if os.path.exists('/app/Files/AT_bot.py') else 1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"