-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
182 lines (174 loc) · 6.12 KB
/
Copy pathcompose.yaml
File metadata and controls
182 lines (174 loc) · 6.12 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
# Adapted from Langfuse v4.12.0's official docker-compose.yml.
# Upstream snapshot: https://github.com/langfuse/langfuse/blob/v4.12.0/docker-compose.yml
# Upstream floats the app images on the `4` tag; we pin 4.11.0, the newest published
# release that tag resolves to (no 4.12.0 image is published).
x-langfuse-environment: &langfuse-environment
NEXTAUTH_URL: http://localhost:4001
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
SALT: ${SALT}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
TELEMETRY_ENABLED: "false"
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000
CLICKHOUSE_URL: http://clickhouse:8123
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_CLUSTER_ENABLED: "false"
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_EVENT_UPLOAD_REGION: auto
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: minio
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_EVENT_UPLOAD_PREFIX: events/
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_MEDIA_UPLOAD_REGION: auto
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: minio
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_MEDIA_UPLOAD_PREFIX: media/
LANGFUSE_BLOB_STORAGE_ENDPOINT_WHITELISTED_HOST: minio
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_AUTH: ${REDIS_AUTH}
REDIS_TLS_ENABLED: "false"
services:
langfuse-worker:
image: docker.io/langfuse/langfuse-worker:4.11.0
restart: unless-stopped
depends_on: &langfuse-dependencies
postgres:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
environment:
<<: *langfuse-environment
langfuse-web:
image: docker.io/langfuse/langfuse:4.11.0
restart: unless-stopped
depends_on: *langfuse-dependencies
ports:
- 127.0.0.1:4001:3000
environment:
<<: *langfuse-environment
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://localhost:9090
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
LANGFUSE_INIT_ORG_ID: ${LANGFUSE_INIT_ORG_ID}
LANGFUSE_INIT_ORG_NAME: ${LANGFUSE_INIT_ORG_NAME}
LANGFUSE_INIT_PROJECT_ID: ${LANGFUSE_INIT_PROJECT_ID}
LANGFUSE_INIT_PROJECT_NAME: ${LANGFUSE_INIT_PROJECT_NAME}
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY}
LANGFUSE_INIT_PROJECT_SECRET_KEY: ${LANGFUSE_SECRET_KEY}
LANGFUSE_INIT_USER_EMAIL: ${LANGFUSE_INIT_USER_EMAIL}
LANGFUSE_INIT_USER_NAME: ${LANGFUSE_INIT_USER_NAME}
LANGFUSE_INIT_USER_PASSWORD: ${LANGFUSE_INIT_USER_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://langfuse-web:3000/api/public/health || exit 1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 20s
proxy:
build:
context: .
dockerfile: Dockerfile.proxy
restart: unless-stopped
depends_on:
langfuse-web:
condition: service_healthy
ports:
- 127.0.0.1:4000:4000
extra_hosts:
- host.docker.internal:host-gateway
environment:
CONTAINERIZED: "true"
OPENAI_API_HOST: ${OPENAI_API_HOST}
OPENAI_API_KEY: ${OPENAI_API_KEY}
LANGFUSE_BASE_URL: http://langfuse-web:3000
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY}
LANGFUSE_PROMPT_NAME: ${LANGFUSE_PROMPT_NAME}
LANGFUSE_PROMPT_LABEL: ${LANGFUSE_PROMPT_LABEL}
TELEMETRY_ENABLED: "false"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:4000/healthz')"]
interval: 5s
timeout: 3s
retries: 10
clickhouse:
image: docker.io/clickhouse/clickhouse-server:25.12
restart: unless-stopped
user: "101:101"
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
volumes:
- langfuse_clickhouse_data:/var/lib/clickhouse
- langfuse_clickhouse_logs:/var/log/clickhouse-server
- ./clickhouse/config.d/disable-trace-log.xml:/etc/clickhouse-server/config.d/disable-trace-log.xml:ro
- ./clickhouse/users.d/disable-profilers.xml:/etc/clickhouse-server/users.d/disable-profilers.xml:ro
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1"]
interval: 5s
timeout: 5s
retries: 10
start_period: 1s
minio:
image: cgr.dev/chainguard/minio
restart: unless-stopped
entrypoint: sh
command: -c 'mkdir -p /data/langfuse && minio server --address ":9000" --console-address ":9001" /data'
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
ports:
- 127.0.0.1:9090:9000
- 127.0.0.1:9091:9001
volumes:
- langfuse_minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 2s
timeout: 5s
retries: 10
start_period: 1s
redis:
image: docker.io/redis:7
restart: unless-stopped
command: ["redis-server", "--requirepass", "${REDIS_AUTH}", "--maxmemory-policy", "noeviction"]
volumes:
- langfuse_redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -a $$REDIS_AUTH ping"]
interval: 3s
timeout: 10s
retries: 10
environment:
REDIS_AUTH: ${REDIS_AUTH}
postgres:
image: docker.io/postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
TZ: UTC
PGTZ: UTC
volumes:
- langfuse_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
volumes:
langfuse_postgres_data:
langfuse_clickhouse_data:
langfuse_clickhouse_logs:
langfuse_minio_data:
langfuse_redis_data: