-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
173 lines (165 loc) · 5.45 KB
/
docker-compose.yml
File metadata and controls
173 lines (165 loc) · 5.45 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
services:
postgres:
container_name: surf-postgres
image: postgres:17-alpine
environment:
POSTGRES_DB: surf
POSTGRES_USER: surf
POSTGRES_PASSWORD: localdev
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U surf -d surf"]
interval: 5s
timeout: 3s
retries: 5
otel-collector:
container_name: surf-otel-collector
image: otel/opentelemetry-collector-contrib:0.120.0
ports:
- "4317:4317" # gRPC receiver
- "4318:4318" # HTTP receiver
- "8889:8889" # Prometheus metrics endpoint
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
# ---------------------------------------------------------------------------
# Langfuse v3 local stack (requires ClickHouse, Redis, MinIO)
# ---------------------------------------------------------------------------
langfuse:
container_name: surf-langfuse
image: langfuse/langfuse:3
restart: unless-stopped
ports:
- "3100:3000"
environment: &langfuse-env
DATABASE_URL: postgresql://langfuse:langfuse@langfuse-db:5432/langfuse
NEXTAUTH_SECRET: dev-secret-do-not-use-in-production
NEXTAUTH_URL: http://localhost:3100
SALT: dev-salt-do-not-use-in-production
ENCRYPTION_KEY: "0000000000000000000000000000000000000000000000000000000000000000"
CLICKHOUSE_URL: http://langfuse-clickhouse:8123
CLICKHOUSE_MIGRATION_URL: clickhouse://langfuse-clickhouse:9000
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_CLUSTER_ENABLED: "false"
REDIS_HOST: langfuse-redis
REDIS_PORT: "6379"
REDIS_AUTH: localdev
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: miniosecret
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://langfuse-minio:9000
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
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: miniosecret
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://localhost:9090
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
# Auto-provision org, project, and API keys for local dev (no manual signup needed)
LANGFUSE_INIT_ORG_ID: surf-local
LANGFUSE_INIT_ORG_NAME: Surf Local Dev
LANGFUSE_INIT_PROJECT_ID: surf-dev
LANGFUSE_INIT_PROJECT_NAME: surf-dev
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: pk-lf-local-dev
LANGFUSE_INIT_PROJECT_SECRET_KEY: sk-lf-local-dev
LANGFUSE_INIT_USER_EMAIL: dev@surf.local
LANGFUSE_INIT_USER_NAME: Developer
LANGFUSE_INIT_USER_PASSWORD: localdev
depends_on:
langfuse-db:
condition: service_healthy
langfuse-clickhouse:
condition: service_healthy
langfuse-redis:
condition: service_healthy
langfuse-minio:
condition: service_healthy
langfuse-worker:
container_name: surf-langfuse-worker
image: langfuse/langfuse-worker:3
restart: unless-stopped
environment:
<<: *langfuse-env
depends_on:
langfuse-db:
condition: service_healthy
langfuse-clickhouse:
condition: service_healthy
langfuse-redis:
condition: service_healthy
langfuse-minio:
condition: service_healthy
langfuse-db:
container_name: surf-langfuse-db
image: postgres:16-alpine
environment:
POSTGRES_USER: langfuse
POSTGRES_PASSWORD: langfuse
POSTGRES_DB: langfuse
volumes:
- langfuse-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U langfuse -d langfuse"]
interval: 5s
timeout: 3s
retries: 5
langfuse-clickhouse:
container_name: surf-langfuse-clickhouse
image: clickhouse/clickhouse-server:latest
restart: unless-stopped
user: "101:101"
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
volumes:
- langfuse-clickhouse:/var/lib/clickhouse
- langfuse-clickhouse-logs:/var/log/clickhouse-server
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
langfuse-redis:
container_name: surf-langfuse-redis
image: redis:7-alpine
restart: unless-stopped
command: --requirepass localdev --maxmemory-policy noeviction
volumes:
- langfuse-redis:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "localdev", "ping"]
interval: 3s
timeout: 10s
retries: 10
langfuse-minio:
container_name: surf-langfuse-minio
image: minio/minio:latest
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: miniosecret
ports:
- "9090:9000"
volumes:
- langfuse-minio:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 1s
timeout: 5s
retries: 5
start_period: 1s
volumes:
pgdata:
langfuse-data:
langfuse-clickhouse:
langfuse-clickhouse-logs:
langfuse-redis:
langfuse-minio: