-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompose.yml
More file actions
188 lines (179 loc) · 4.83 KB
/
compose.yml
File metadata and controls
188 lines (179 loc) · 4.83 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
services:
postgres:
image: postgres:17.6-alpine3.21
container_name: postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
meilisearch:
image: getmeili/meilisearch:v1.16
container_name: meilisearch
ports:
- "127.0.0.1:7700:7700"
restart: always
environment:
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_ENV=production
volumes:
- meilisearch_data:/meili_data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 5s
timeout: 3s
retries: 5
temporal:
image: temporalio/auto-setup:1.29.6
container_name: temporal
restart: always
depends_on:
postgres:
condition: service_healthy
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PASSWORD}
- POSTGRES_SEEDS=postgres
ports:
- "127.0.0.1:7233:7233"
healthcheck:
test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "temporal:7233"]
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
temporal-ui:
image: temporalio/ui:2.48.1
container_name: temporal-ui
restart: always
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=https://temporal.ifkash.dev
networks:
- default
- web_network
manager:
image: ghcr.io/vvip-kitchen/boo-manager:latest
container_name: manager
restart: always
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8080:8080"
environment:
- DB_HOST=${POSTGRES_HOST}
- DB_PORT=5432
- DB_USER=${POSTGRES_USER}
- DB_PASSWORD=${POSTGRES_PASSWORD}
- DB_NAME=${POSTGRES_DB}
- MANAGER_API_TOKEN=${MANAGER_API_TOKEN}
networks:
- default
- web_network
discord-bot:
image: ghcr.io/vvip-kitchen/boo:latest
container_name: boo
command: uv run src/main.py
restart: always
depends_on:
manager:
condition: service_started
temporal:
condition: service_healthy
networks:
- default
- internal_net
environment:
- ENVIRONMENT=${ENVIRONMENT}
- ADMIN_LIST=${ADMIN_LIST}
- CONTEXT_LIMIT=${CONTEXT_LIMIT}
- DISCORD_TOKEN=${DISCORD_TOKEN}
- TENOR_API_KEY=${TENOR_API_KEY}
- DB_SERVICE_BASE_URL=manager:8080
- TOMORROW_IO_API_KEY=${TOMORROW_IO_API_KEY}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- OPENROUTER_MODEL=${OPENROUTER_MODEL}
- EXA_API_KEY=${EXA_API_KEY}
- VOYAGEAI_API_KEY=${VOYAGEAI_API_KEY}
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- GITHUB_TOKEN=${GITHUB_TOKEN}
- MANAGER_API_TOKEN=${MANAGER_API_TOKEN}
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_TASK_QUEUE=boo-tasks
- TEMPORAL_NAMESPACE=default
boo-worker:
image: ghcr.io/vvip-kitchen/boo:latest
command: uv run src/temporal_worker.py
restart: always
depends_on:
meilisearch:
condition: service_healthy
manager:
condition: service_started
temporal:
condition: service_healthy
networks:
- default
- internal_net
environment:
- ENVIRONMENT=${ENVIRONMENT}
- ADMIN_LIST=${ADMIN_LIST}
- CONTEXT_LIMIT=${CONTEXT_LIMIT}
- DISCORD_TOKEN=${DISCORD_TOKEN}
- TENOR_API_KEY=${TENOR_API_KEY}
- DB_SERVICE_BASE_URL=manager:8080
- TOMORROW_IO_API_KEY=${TOMORROW_IO_API_KEY}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- OPENROUTER_MODEL=${OPENROUTER_MODEL}
- EXA_API_KEY=${EXA_API_KEY}
- VOYAGEAI_API_KEY=${VOYAGEAI_API_KEY}
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- GITHUB_TOKEN=${GITHUB_TOKEN}
- MANAGER_API_TOKEN=${MANAGER_API_TOKEN}
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_TASK_QUEUE=boo-tasks
- TEMPORAL_NAMESPACE=default
deploy:
replicas: 4
sandbox:
image: ghcr.io/vvip-kitchen/boo-sandbox:latest
container_name: sandbox
read_only: true
mem_limit: 1g
cpus: 1.0
pids_limit: 128
ulimits:
nofile: 2048
restart: always
networks:
- internal_net
security_opt:
- "no-new-privileges:true"
cap_drop:
- ALL
tmpfs:
- /tmp:rw,nosuid,size=128m
- /home/sandboxuser/.cache:rw,nosuid,size=64m
volumes:
postgres_data:
meilisearch_data:
networks:
default: {}
internal_net:
internal: true
web_network:
external: true