-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.common.yml
262 lines (262 loc) · 7.73 KB
/
docker-compose.common.yml
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
services:
# Infra services
envoy-common:
image: envoyproxy/envoy:v1.22-latest
container_name: envoy
profiles: ["app", "infra"]
ports:
- "${ENVOY_PORT}:${ENVOY_PORT}"
volumes:
- ./config/envoy/envoy.yaml:/etc/envoy/envoy.yaml
postgres-common:
image: postgres
container_name: postgres
profiles: ["app", "infra"]
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- ${DATA_DIR}/postgres:/var/lib/postgresql/data
- ${CONFIG_DIR}/postgres/postgres_init.sh:/docker-entrypoint-initdb.d/init.sh
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_MULTIPLE_DATABASES
litellm-common:
image: ghcr.io/berriai/litellm:main-v1.41.3
container_name: litellm
profiles: ["app", "infra"]
env_file:
- ${CONFIG_DIR}/litellm/.env
ports:
- "${LITELLM_PORT}:${LITELLM_PORT}"
volumes:
- ${CONFIG_DIR}/litellm/config.yaml:/app/config.yaml
command: --config /app/config.yaml --detailed_debug
mongo-common:
image: mongo
container_name: mongo
profiles: ["app", "infra"]
restart: always
volumes:
- ${DATA_DIR}/mongo:/data/db:rw
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
chroma-common:
image: chromadb/chroma
container_name: chroma
profiles: ["app", "infra"]
ports:
- "${CHROMA_PORT}:${CHROMA_PORT}"
volumes:
- ${DATA_DIR}/chromadb:/chroma/chroma
environment:
- CHROMA_SERVER_AUTHN_CREDENTIALS
- CHROMA_SERVER_AUTHN_PROVIDER
- CHROMA_AUTH_TOKEN_TRANSPORT_HEADER
vector-admin-common:
image: mintplexlabs/vectoradmin
profiles: ["debug"]
ports:
- "${VECTOR_ADMIN_PORT}:${VECTOR_ADMIN_PORT}"
environment:
- SERVER_PORT=${VECTOR_ADMIN_PORT}
- JWT_SECRET=${VECTOR_ADMIN_JWT_SECRET}
- INNGEST_EVENT_KEY=${VECTOR_ADMIN_INNGEST_EVENT_KEY}
- INNGEST_SIGNING_KEY=${VECTOR_ADMIN_INNGEST_SIGNING_KEY}
- INNGEST_LANDING_PAGE=${VECTOR_ADMIN_INNGEST_LANDING_PAGE}
- DATABASE_CONNECTION_STRING=${VECTOR_ADMIN_DB_URL}
ory-kratos-migrate-common:
image: oryd/kratos:v1.2.0
container_name: ory-kratos-migrate
profiles: ["app", "infra"]
environment:
- DSN=${KRATOS_DATABASE_URL}
volumes:
- type: bind
source: ${CONFIG_DIR}/kratos
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
depends_on:
- postgres
ory-kratos-common:
image: oryd/kratos:v1.2.0
container_name: ory-kratos
profiles: ["app", "infra"]
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
ports:
- "${KRATOS_PUBLIC_PORT}:${KRATOS_PUBLIC_PORT}"
- "${KRATOS_ADMIN_PORT}:${KRATOS_ADMIN_PORT}"
environment:
- DSN=${KRATOS_DATABASE_URL}
- LOG_LEVEL=trace
volumes:
- type: bind
source: ${CONFIG_DIR}/kratos
target: /etc/config/kratos
depends_on:
- ory-kratos-migrate
# # This container is helpful in case you want to manage users.
# # Currently it's excluded from the infra profile for the sake of simplicity.
# # To start it, simply run "docker compose up ory-kratos-admin-ui -d"
# ory-kratos-admin-ui-common:
# image: ghcr.io/dfoxg/kratos-admin-ui:v2.3.2
# container_name: ory-kratos-admin-ui
# ports:
# - '${KRATOS_ADMIN_UI_PORT}:8080'
# restart: unless-stopped
# environment:
# - KRATOS_ADMIN_URL=${KRATOS_ADMIN_URL}
# - KRATOS_PUBLIC_URL=${KRATOS_PUBLIC_URL}
ory-kratos-self-serve-ui-common:
image: oryd/kratos-selfservice-ui-node:v1.2.0
container_name: ory-kratos-self-serve-ui
profiles: ["app", "infra"]
ports:
- "${KRATOS_SELF_SERVE_UI_PORT}:${KRATOS_SELF_SERVE_UI_PORT}"
environment:
- PORT=${KRATOS_SELF_SERVE_UI_PORT}
- KRATOS_PUBLIC_URL=${KRATOS_PUBLIC_URL}
- KRATOS_BROWSER_URL=${KRATOS_SELF_SERVE_UI_BROWSER_URL}
- COOKIE_SECRET=${KRATOS_SELF_SERVE_UI_COOKIE_SECRET}
- CSRF_COOKIE_NAME=${KRATOS_SELF_SERVE_UI_CSRF_COOKIE_NAME}
- CSRF_COOKIE_SECRET=${KRATOS_SELF_SERVE_UI_CSRF_COOKIE_SECRET}
restart: on-failure
healthcheck:
test:
[
"CMD-SHELL",
"nc -z -w 5 localhost ${KRATOS_SELF_SERVE_UI_PORT} || exit 1"
]
interval: 2s
timeout: 5s
retries: 5
start_period: 40s
depends_on:
- ory-kratos
# We support Hashicorp Vault but for now the default secret manager
# is a simple file-based secret manager.
vault-common:
image: vault:1.13.3
container_name: vault
profiles: ["misc"]
environment:
- VAULT_ADDR=http://0.0.0.0:8200
- VAULT_API_ADDR=http://0.0.0.0:8200
cap_add:
- IPC_LOCK
volumes:
- ${DATA_DIR}/vault:/vault
- ${CONFIG_DIR}/vault/config.hcl:/vault/config/vault.hcl
ports:
- "8200:8200"
- "8201:8201"
- "8202:8202"
entrypoint: vault server -config=/vault/config/vault.hcl
# App services
api-common:
container_name: api
profiles: ["app"]
environment:
- TELEMETRY_ENABLED
- SMTP_CONNECTION_URL
- SLACK_APP_TOKEN
- SECRET_MANAGER_TYPE
- SECRET_MANAGER_DIRECTORY
- HASHICORP_VAULT_ROOT_TOKEN
- HASHICORP_VAULT_UNSEAL_TOKEN
- LANGFUSE_SECRET_KEY
- LANGFUSE_PUBLIC_KEY
- LANGFUSE_HOST
- HASHICORP_VAULT_URL
- MONGO_URI
- KRATOS_PUBLIC_URL
- KRATOS_ADMIN_URL
- DATA_PROCESSOR_URL
- PAGERDUTY_SECRET
- LITELLM_URL
- LOG_PARSER_URL
- DASHBOARD_APP_URL
- NODE_ENV=development
- METADATA_ENCRYPTION_KEY=f78d8202-bb2a-49fe-bd63-a586cd921226
- ENCRYPTION_SALT=1234567890123456
- ORY_WEBHOOK_SECRET=super-secret-ory-webhook-key
- CHROMA_HOST
- CHROMA_API_KEY=${CHROMA_SERVER_AUTHN_CREDENTIALS}
ports:
- "${API_PORT}:${API_PORT}"
volumes:
- ${DATA_DIR}/secrets:${SECRET_MANAGER_DIRECTORY}
depends_on:
- mongo
extra_hosts:
- "host.docker.internal:host-gateway"
slackbot-common:
container_name: slackbot
profiles: ["app"]
environment:
- TELEMETRY_ENABLED
- SLACK_APP_TOKEN
- SLACK_BOT_TOKEN
- SLACK_SIGNING_SECRET
- API_URL
- PORT=SLACKBOT_PORT
- NODE_ENV=development
ports:
- "${SLACKBOT_PORT}:${SLACKBOT_PORT}"
data-processor-common:
container_name: data-processor
profiles: ["app"]
environment:
- TELEMETRY_ENABLED
- DOC_INDEXER_URL
- SECRET_MANAGER_TYPE
- SECRET_MANAGER_DIRECTORY
- SNAPSHOTS_DIRECTORY
- HASHICORP_VAULT_ROOT_TOKEN
- HASHICORP_VAULT_UNSEAL_TOKEN
- HASHICORP_VAULT_URL
- MONGO_URI
- IS_DOCKER=true
ports:
- "${DATA_PROCESSOR_PORT}:${DATA_PROCESSOR_PORT}"
volumes:
- ${DATA_DIR}/secrets:${SECRET_MANAGER_DIRECTORY}
- ${DATA_DIR}/snapshots:${SNAPSHOTS_DIRECTORY}
depends_on:
- mongo
doc-indexer-common:
container_name: doc-indexer
profiles: ["app"]
environment:
- TELEMETRY_ENABLED
- SNAPSHOTS_DIRECTORY
- MONGO_URI
- IS_DOCKER=true
- CHROMA_HOST=chroma
- CHROMA_SSL=false
- CHROMA_PORT=8000
- CHROMA_API_KEY=${CHROMA_SERVER_AUTHN_CREDENTIALS}
- LITELLM_URL
ports:
- "${DOC_INDEXER_PORT}:${DOC_INDEXER_PORT}"
volumes:
- ${DATA_DIR}/snapshots:${SNAPSHOTS_DIRECTORY}
depends_on:
- mongo
log-parser-common:
container_name: log-parser
profiles: ["app"]
environment:
- TELEMETRY_ENABLED
- PORT=${LOG_PARSER_PORT}
ports:
- "${LOG_PARSER_PORT}:${LOG_PARSER_PORT}"
dashboard-common:
container_name: dashboard
profiles: ["app"]
ports:
- "${DASHBOARD_PORT}:80"
depends_on:
ory-kratos-self-serve-ui:
condition: service_healthy