Add Langfuse template - #1072
Conversation
Open-source LLM engineering platform: tracing, prompt management, evaluation and cost/usage analytics for LLM apps. Stack: langfuse-web + langfuse-worker (image tag 4), Postgres 17, ClickHouse 25.12, Redis 7, MinIO. Adapted from the official docker-compose.yml at https://github.com/langfuse/langfuse/blob/main/docker-compose.yml, with all secrets generated via Dokploy's template.toml helpers instead of the upstream hardcoded defaults. MinIO gets its own domain because Langfuse's web UI issues presigned S3 URLs that the browser fetches directly (media attached to traces), so that endpoint has to be reachable from outside the internal network. Validated locally with build-scripts/validate-template.ts, validate-docker-compose.ts and generate-meta.js --check (all pass), plus `docker compose config` with sample secrets to confirm the langfuse-web override of LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT resolves correctly. Not yet deployed on a live Dokploy instance.
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
Ran this locally with plain `docker compose` (temporarily publishing `langfuse-web:3000` and `minio:9000` via an override file, not committed) to actually boot the stack rather than only statically validate it:
One thing worth flagging for reviewers: Only thing I still can't verify without a live Dokploy instance is the actual domain-routing (Traefik) layer for the two |
Docker sets HOSTNAME to the container id, and Next.js standalone binds to it, which resolves to a single network's IP. With Dokploy's proxy network attached as a second network, Traefik got connection refused (502). Setting HOSTNAME=0.0.0.0 fixes routing; verified with a live deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Reviewed and deploy-tested on a live Dokploy instance. The template is a faithful adaptation of the official docker-compose.yml — same images and tags ( One bug found and fixed (pushed to this branch as That log line is the tell — Docker sets Deploy evidence (after fix):
LGTM after the fix — ready to merge. |
Closes #1071
Summary
Adds a self-hosted Langfuse template. Langfuse is an open-source LLM engineering platform: tracing/observability for LLM calls, versioned prompt management, an in-browser playground, dataset-based evaluation, and cost/usage analytics.
Stack
Adapted from the official docker-compose.yml:
langfuse-web/langfuse-worker—langfuse/langfuse:4/langfuse/langfuse-worker:4postgres:17— relational metadata storeclickhouse/clickhouse-server:25.12— analytics/trace storageredis:7— cache/queuecgr.dev/chainguard/minio) — S3-compatible blob storage for trace/media payloadsChanges vs. upstream compose:
ports:) per this repo's conventions — Dokploy handles routing viatemplate.tomldomains.POSTGRES_PASSWORD,CLICKHOUSE_PASSWORD,MINIO_ROOT_PASSWORD,REDIS_AUTH,NEXTAUTH_SECRET,SALT,ENCRYPTION_KEY) are generated via Dokploy's${password:32}/${hash:64}helpers instead of upstream's hardcoded# CHANGEMEdefaults.langfuse-web; a second is bound tominio(port 9000) because Langfuse's web UI issues presigned S3 URLs that the browser fetches directly (e.g. media attached to traces) — the internalminiohostname isn't reachable from outside.langfuse-web'sLANGFUSE_S3_MEDIA_UPLOAD_ENDPOINTis overridden to that public domain whilelangfuse-workerkeeps the internal one, mirroring how upstream's own compose file distinguishes the two.Testing
node build-scripts/generate-meta.js --check→511 templates validatedtsx build-scripts/validate-template.ts --dir blueprints/langfuse --verbose→ structure valid, 11 variables processed, both domains resolved correctlytsx build-scripts/validate-docker-compose.ts --file blueprints/langfuse/docker-compose.yml --verbose→ structure valid, all 6 services detecteddocker compose configwith sample env values → confirmed the YAML anchor/override setup resolves correctly (langfuse-webpicks up the public MinIO endpoint,langfuse-workerkeeps the internal one;DATABASE_URLinterpolates the generated Postgres password correctly)Not yet deployed on a live Dokploy instance — relying on the PR preview this repo generates for that. Will test the preview once it's up and report back.
Notes for reviewers
instructions.md, no license key is configured by this template.icon.svgfrom their repo.