-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.dev.yaml
264 lines (260 loc) · 8.61 KB
/
docker-compose.dev.yaml
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
version: '3'
services:
api:
build:
context: .
dockerfile: Dockerfile
target: api-dev-env
ports:
- ${API_PORT:-8080}:80
restart: always
env_file:
- .env
environment:
- LOG_LEVEL=${LOG_LEVEL:-debug}
- APP_URL=${SERVER_URL:-http://localhost:8080}
- POSTGRES_HOST=postgres
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
- RUNNER_TOKEN=${RUNNER_TOKEN-oh-hallo-insecure-token}
- SERVER_URL=${SERVER_URL:-http://localhost:8080}
- KEYCLOAK_URL=http://keycloak:8080/auth
- JANITOR_SLACK_WEBHOOK_URL=${JANITOR_SLACK_WEBHOOK_URL:-}
- JANITOR_SLACK_IGNORE_USERS=${JANITOR_SLACK_IGNORE_USERS:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- TOGETHER_API_KEY=${TOGETHER_API_KEY:-}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
- STRIPE_WEBHOOK_SIGNING_SECRET=${STRIPE_WEBHOOK_SIGNING_SECRET:-}
- STRIPE_PRICE_LOOKUP_KEY=${STRIPE_PRICE_LOOKUP_KEY:-}
- FRONTEND_URL=http://frontend:8081
# this is an insecure development key do not use!
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD-oh-hallo-insecure-password}
- KEYCLOAK_FRONTEND_URL=${KEYCLOAK_FRONTEND_URL:-http://localhost:8080/auth/}
# lock down dashboard in production
- ADMIN_USER_IDS=${ADMIN_USER_IDS-all}
- TEXT_EXTRACTION_URL=http://llamaindex:5000/api/v1/extract
- RAG_INDEX_URL=http://llamaindex:5000/api/v1/rag/chunk
- RAG_QUERY_URL=http://llamaindex:5000/api/v1/rag/query
- EVAL_USER_ID=${EVAL_USER_ID:-}
- FILESTORE_LOCALFS_PATH=/filestore
- SENTRY_DSN_API=${SENTRY_DSN_API:-}
- SENTRY_DSN_FRONTEND=${SENTRY_DSN_FRONTEND:-}
- GOOGLE_ANALYTICS_FRONTEND=${GOOGLE_ANALYTICS_FRONTEND:-}
# Tools configuration
- TOOLS_ENABLED=true
- TOOLS_PROVIDER=${TOOLS_PROVIDER:-helix}
- TOOLS_MODEL=${TOOLS_MODEL:-llama3:instruct}
# Email notifications
- EMAIL_MAILGUN_DOMAIN=${EMAIL_MAILGUN_DOMAIN:-}
- EMAIL_MAILGUN_API_KEY=${EMAIL_MAILGUN_API_KEY:-}
# SMTP
- EMAIL_SMTP_HOST=${EMAIL_SMTP_HOST:-}
- EMAIL_SMTP_PORT=${EMAIL_SMTP_PORT:-}
- EMAIL_SMTP_USERNAME=${EMAIL_SMTP_USERNAME:-}
- EMAIL_SMTP_PASSWORD=${EMAIL_SMTP_PASSWORD:-}
# Discord integration
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-}
volumes:
- ./go.mod:/app/go.mod
- ./go.sum:/app/go.sum
- ./api:/app/api
- ${FILESTORE_DATA:-helix-filestore}:/filestore
depends_on:
- postgres
- keycloak
extra_hosts:
- "host.docker.internal:host-gateway"
postgres:
image: postgres:12.13-alpine
restart: always
ports:
- 5432:5432
volumes:
- ${POSTGRES_DATA:-helix-postgres-db}:/var/lib/postgresql/data
- ./scripts/postgres:/docker-entrypoint-initdb.d
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
- POSTGRES_DATABASES=keycloak
# postgres 15 with pgvector installed
# why run this as a different server?
# because we want the quick path to something working without having to create a hard dependency on pgvector
# being installed in our main database
# also - we would need to migrate our existing postgres 12 DB -> 15, which is a bit of a pain
# TODO: figure out how to ship the pgvector extension with our main database
# so we don't need to run what is essentially 2 versions of postgres
pgvector:
profiles: [full]
image: ankane/pgvector
restart: always
ports:
- 5433:5432
volumes:
- ${PGVECTOR_DATA:-helix-pgvector-db}:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
keycloak:
image: quay.io/keycloak/keycloak:23.0
restart: always
environment:
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://postgres:5432/keycloak
- KC_DB_USERNAME=postgres
- KC_DB_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD-oh-hallo-insecure-password}
- KC_PROXY_HEADERS=forwarded|xforwarded
- KC_HEALTH_ENABLED=true
- KC_HOSTNAME_PATH=/auth
- KC_HTTP_RELATIVE_PATH=/auth/
- KC_HOSTNAME_URL=${KEYCLOAK_FRONTEND_URL:-http://localhost:8080/auth/}
- KC_HOSTNAME_ADMIN_URL=${KEYCLOAK_FRONTEND_URL:-http://localhost:8080/auth/}
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8080;echo -e \"GET /auth/health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3"]
interval: 5s
timeout: 5s
retries: 30
command: ["start-dev"]
webhook_relay_stripe:
image: webhookrelay/webhookrelayd
environment:
- KEY=${WEBHOOK_RELAY_KEY:-}
- SECRET=${WEBHOOK_RELAY_SECRET:-}
- BUCKET=${WEBHOOK_RELAY_BUCKET:-}
webhook_relay_github:
image: webhookrelay/webhookrelayd
environment:
- KEY=${WEBHOOK_RELAY_KEY:-}
- SECRET=${WEBHOOK_RELAY_SECRET:-}
- BUCKET=${WEBHOOK_RELAY_BUCKET_GITHUB:-}
tika:
image: apache/tika:2.9.2.1
ports:
- 9998:9998
typense-ui:
image: ghcr.io/bfritscher/typesense-dashboard:latest
ports:
- 8877:80
volumes:
- ./scripts/config.json:/srv/config.json
depends_on:
- typesense
typesense:
build:
context: .
dockerfile: Dockerfile.typesense
command: ["--data-dir", "/data", "--api-key", "typesense"]
ports:
- 8108:8108
volumes:
- ${TYPESENSE_DATA:-helix-typesense-db}:/data
chrome:
image: ghcr.io/go-rod/rod:v0.115.0
restart: always
volumes:
- ./integration-test/data/smoke:/integration-test/data/smoke
ports:
- 7317:7317
llamaindex:
profiles: [full]
image: registry.helix.ml/helix/llamaindex:latest
# build:
# context: llamaindex
# dockerfile: Dockerfile
# ports:
# - 5000:5000
environment:
- POSTGRES_HOST=pgvector
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
# entrypoint: ${LLAMAINDEX_ENTRYPOINT:-tail -f /dev/null}
restart: always
volumes:
- ./llamaindex/src:/home/app/src
gptscript_runner:
build:
context: .
dockerfile: Dockerfile.gptscript
restart: always
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- API_HOST=http://api:80
- API_TOKEN=${RUNNER_TOKEN-oh-hallo-insecure-token}
- GPTSCRIPT_PROVIDER_API_API_KEY=${RUNNER_TOKEN:-}
- CONCURRENCY=20 # number of tasks to run concurrently
- MAX_TASKS=0 # max number of tasks to run before exiting. Set to 0 to run forever
depends_on:
- api
dev_gpu_runner:
profiles: ["dev_gpu_runner"]
build:
context: .
dockerfile: Dockerfile.runner
args:
TAG: 2024-12-07a-small
#image: ${RUNNER_IMAGE:-registry.helix.ml/helix/runner:latest-large}
entrypoint: ${RUNNER_ENTRYPOINT:-tail -f /dev/null}
env_file:
- .env
volumes:
- .:/workspace/helix
- ./cog/helix_cog_wrapper.py:/workspace/cog-sdxl/helix_cog_wrapper.py
# - ~/.cache/huggingface:/root/.cache/huggingface
# comment these out if you don't have appropriate repos checked out
#- ../cog-sdxl/predict.py:/workspace/cog-sdxl/predict.py
#- ../cog-sdxl/weights.py:/workspace/cog-sdxl/weights.py
# - ../axolotl:/workspace/axolotl
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
demos:
profiles: ["demos"]
build:
context: .
dockerfile: Dockerfile.demos
ports:
- ${DEMOS_PORT:-8085}:8085
restart: always
env_file:
- .env
environment:
- PORT=8085
entrypoint: ${DEMOS_ENTRYPOINT:-tail -f /dev/null}
volumes:
- ./go.mod:/app/go.mod
- ./go.sum:/app/go.sum
- ./demos:/app/demos
frontend:
ports:
- 8081:${FRONTEND_INTERNAL_PORT:-8081}
build:
context: .
dockerfile: Dockerfile
target: ui-dev-env
restart: always
volumes:
- ./frontend/package.json:/app/package.json
- ./frontend/src:/app/src
- ./frontend/assets:/app/assets
- ./frontend/index.html:/app/index.html
- ./frontend/tsconfig.json:/app/tsconfig.json
- ./frontend/vite.config.ts:/app/vite.config.ts
volumes:
helix-keycloak-db:
helix-postgres-db:
helix-pgvector-db:
helix-filestore:
helix-typesense-db:
networks:
default:
name: helix_default