docs(observability): document local Langfuse setup

Add the README section and .env.langfuse.example template for running
Langfuse locally via Compose. The Compose file itself is tracked
separately.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 11:25:44 +03:30
parent 88b2db0c3d
commit 3d3631c620
2 changed files with 128 additions and 0 deletions

77
.env.langfuse.example Normal file
View File

@@ -0,0 +1,77 @@
# Langfuse local development environment.
#
# Usage:
# cp .env.langfuse.example .env.langfuse
# # replace all CHANGE_ME values before starting
# docker compose --env-file .env.langfuse -f docker-compose.langfuse.yml up -d
#
# Generate secrets with commands such as:
# openssl rand -base64 32
# openssl rand -hex 16
# openssl rand -hex 32
#
# Do not commit .env.langfuse.
# Public URL used by Langfuse itself. For local browser access this should match
# http://localhost:3000. For a VM, set this to your HTTPS domain.
LANGFUSE_NEXTAUTH_URL=http://localhost:3000
# Host ports. Internal container ports stay unchanged and are used for
# container-to-container communication.
LANGFUSE_WEB_PORT=3000
LANGFUSE_WORKER_PORT=3030
LANGFUSE_POSTGRES_HOST_PORT=15432
LANGFUSE_REDIS_HOST_PORT=16379
LANGFUSE_CLICKHOUSE_HTTP_PORT=18123
LANGFUSE_CLICKHOUSE_NATIVE_PORT=19000
LANGFUSE_MINIO_API_PORT=9090
LANGFUSE_MINIO_CONSOLE_PORT=9091
# Core Langfuse secrets. Replace these values.
LANGFUSE_NEXTAUTH_SECRET=CHANGE_ME_generate_with_openssl_rand_base64_32
LANGFUSE_SALT=CHANGE_ME_generate_with_openssl_rand_hex_16
# Must be exactly 64 hex characters. Generate with: openssl rand -hex 32
LANGFUSE_ENCRYPTION_KEY=CHANGE_ME_generate_with_openssl_rand_hex_32
# Langfuse internal Postgres. This is not the chatbot application's Postgres.
LANGFUSE_POSTGRES_VERSION=17
LANGFUSE_POSTGRES_USER=postgres
LANGFUSE_POSTGRES_PASSWORD=CHANGE_ME_langfuse_postgres_password
LANGFUSE_POSTGRES_DB=postgres
# Langfuse internal ClickHouse.
LANGFUSE_CLICKHOUSE_USER=clickhouse
LANGFUSE_CLICKHOUSE_PASSWORD=CHANGE_ME_langfuse_clickhouse_password
LANGFUSE_CLICKHOUSE_CLUSTER_ENABLED=false
# Langfuse internal Redis.
LANGFUSE_REDIS_PORT=6379
LANGFUSE_REDIS_AUTH=CHANGE_ME_langfuse_redis_password
# Langfuse local MinIO/object storage.
LANGFUSE_MINIO_ROOT_USER=minio
LANGFUSE_MINIO_ROOT_PASSWORD=CHANGE_ME_langfuse_minio_password
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID=minio
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY=CHANGE_ME_langfuse_minio_password
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID=minio
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY=CHANGE_ME_langfuse_minio_password
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT_PUBLIC=http://localhost:9090
LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID=minio
LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY=CHANGE_ME_langfuse_minio_password
LANGFUSE_S3_BATCH_EXPORT_EXTERNAL_ENDPOINT=http://localhost:9090
# Development defaults.
LANGFUSE_TELEMETRY_ENABLED=false
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=false
# Optional headless initialization. Leave blank to create the organization,
# project, user, and API keys in the UI after startup.
LANGFUSE_INIT_ORG_ID=
LANGFUSE_INIT_ORG_NAME=
LANGFUSE_INIT_PROJECT_ID=
LANGFUSE_INIT_PROJECT_NAME=
LANGFUSE_INIT_PROJECT_PUBLIC_KEY=
LANGFUSE_INIT_PROJECT_SECRET_KEY=
LANGFUSE_INIT_USER_EMAIL=
LANGFUSE_INIT_USER_NAME=
LANGFUSE_INIT_USER_PASSWORD=