-
-
Notifications
You must be signed in to change notification settings - Fork 310
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (76 loc) · 1.94 KB
/
docker-compose.yml
File metadata and controls
80 lines (76 loc) · 1.94 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Production Docker Compose for Alita Robot
# Uses pre-built images from GHCR, optimized for Dokploy deployment
#
# Environment variables to set in Dokploy UI:
# BOT_TOKEN, OWNER_ID, MESSAGE_DUMP, WEBHOOK_DOMAIN, WEBHOOK_SECRET
services:
alita:
image: ghcr.io/divkix/alita_robot:latest
container_name: alita-robot
restart: always
environment:
DATABASE_URL: postgresql://alita:alita@postgres:5432/alita
REDIS_ADDRESS: redis:6379
REDIS_PASSWORD: redis
AUTO_MIGRATE: "false"
USE_WEBHOOKS: "true"
HTTP_PORT: "8080"
DROP_PENDING_UPDATES: "true"
BOT_TOKEN: ${BOT_TOKEN}
OWNER_ID: ${OWNER_ID}
MESSAGE_DUMP: ${MESSAGE_DUMP}
WEBHOOK_DOMAIN: ${WEBHOOK_DOMAIN}
WEBHOOK_SECRET: ${WEBHOOK_SECRET}
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD", "/alita_robot", "--health"]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
memory: 1G
cpus: "1.0"
reservations:
memory: 256M
cpus: "0.25"
postgres:
image: postgres:18-alpine
container_name: alita-postgres
restart: always
environment:
POSTGRES_USER: alita
POSTGRES_PASSWORD: alita
POSTGRES_DB: alita
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U alita -d alita"]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 512M
cpus: "0.5"
redis:
image: redis:latest
container_name: alita-redis
restart: always
command: redis-server --requirepass redis
deploy:
resources:
limits:
memory: 256M
cpus: "0.25"
volumes:
postgres_data: