-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yaml
112 lines (108 loc) · 4.05 KB
/
docker-compose.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
version: '3'
services:
api:
image: registry.helix.ml/helix/controlplane:latest
# If you want to run the API on a different port, set the
# API_PORT environment variable and also updated env variables
# for SERVER_URL and KEYCLOAK_FRONTEND_URL to match how you
# connect to Helix
ports:
- ${API_PORT:-8080}:80
restart: always
env_file:
- .env
environment:
- 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}
- TOGETHER_API_KEY=${TOGETHER_API_KEY:-}
- RUNNER_TOKEN=${RUNNER_TOKEN-oh-hallo-insecure-token}
- SERVER_URL=${SERVER_URL:-http://localhost:8080}
- KEYCLOAK_URL=http://keycloak:8080/auth
# 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
volumes:
- ${FILESTORE_DATA:-helix-filestore}:/filestore
depends_on:
- postgres
- keycloak
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:
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", "--proxy", "edge"]
llamaindex:
image: registry.helix.ml/helix/llamaindex:latest
# ports:
# - 5000:5000
restart: always
environment:
- POSTGRES_HOST=pgvector
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
volumes:
helix-keycloak-db:
helix-postgres-db:
helix-pgvector-db:
helix-filestore: