68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
x-default: &default
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 100m
|
|
max-file: "3"
|
|
|
|
services:
|
|
langfuse-server:
|
|
<<: *default
|
|
image: langfuse/langfuse:${LANGFUSE_VERSION:-3.115.0}
|
|
ports:
|
|
- "${LANGFUSE_PORT:-3000}:3000"
|
|
environment:
|
|
- TZ=${TZ:-UTC}
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@langfuse-db:5432/${POSTGRES_DB:-langfuse}
|
|
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
|
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
|
- SALT=${SALT}
|
|
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-true}
|
|
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}
|
|
depends_on:
|
|
langfuse-db:
|
|
condition: service_healthy
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2.0'
|
|
memory: 2G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/public/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
langfuse-db:
|
|
<<: *default
|
|
image: postgres:${POSTGRES_VERSION:-17.2-alpine3.21}
|
|
environment:
|
|
- TZ=${TZ:-UTC}
|
|
- POSTGRES_USER=${POSTGRES_USER:-postgres}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
|
|
- POSTGRES_DB=${POSTGRES_DB:-langfuse}
|
|
volumes:
|
|
- langfuse_db_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.25'
|
|
memory: 256M
|
|
|
|
volumes:
|
|
langfuse_db_data:
|