-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (50 loc) · 1.43 KB
/
docker-compose.yml
File metadata and controls
52 lines (50 loc) · 1.43 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
services:
bot:
build: .
container_name: tg-bot-app
restart: "${CONTAINER_RESTART_POLICY:-unless-stopped}"
env_file:
- .env
volumes:
- ./storage/app:/app/storage/app
- ./persona:/app/persona
- ./storage/tg-bot-api:/var/lib/telegram-bot-api:ro
- ${CODEX_HOST_DIR:?set CODEX_HOST_DIR in .env}:/root/.codex
ports:
- "9000:9000"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:9000/healthz"]
interval: 20s
timeout: 3s
retries: 6
caddy:
image: caddy:2.10.2
container_name: tg-bot-caddy
restart: "${CONTAINER_RESTART_POLICY:-unless-stopped}"
profiles: ["edge"]
env_file:
- .env
depends_on:
- bot
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./storage/caddy/data:/data
- ./storage/caddy/config:/config
telegram-bot-api:
image: aiogram/telegram-bot-api:latest
container_name: telegram-bot-api
restart: "${CONTAINER_RESTART_POLICY:-unless-stopped}"
profiles: ["localbotapi"]
environment:
TELEGRAM_API_ID: ${TELEGRAM_API_ID}
TELEGRAM_API_HASH: ${TELEGRAM_API_HASH}
TELEGRAM_LOCAL: 1
TELEGRAM_MAX_WEBHOOK_CONNECTIONS: 40
command: ["--local", "--http-port", "8081", "--dir", "/var/lib/telegram-bot-api"]
volumes:
- ./storage/tg-bot-api:/var/lib/telegram-bot-api
ports:
- "127.0.0.1:8081:8081"