🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
improved docker handling
Max Deichmanne6e59b87ac78
diff --git a/.blub b/.blubnew file mode 100644index 0000000000..1be04bb350--- /dev/null+++ b/.blub@@ -0,0 +1,17 @@+# When adding additional environment variables, the schema in "/src/env.mjs"+# should be updated accordingly.++# Prisma+# https://www.prisma.io/docs/reference/database-reference/connection-urls#env+DIRECT_URL="postgresql://postgres:postgres@localhost:5432/postgres"+DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"++# Next Auth+# You can generate a new secret on the command line with:+# openssl rand -base64 32+# https://next-auth.js.org/configuration/options#secret+# NEXTAUTH_SECRET=""+NEXTAUTH_URL="http://localhost:3000"+NEXTAUTH_SECRET="secret"++PYPI_TOKEN="pypi-AgEIcHlwaS5vcmcCJGYyMzA0YThiLWQ2MjItNDkwMS1iNGNlLTc1NzQyMDFhMGRjNgACKlszLCJmYmJjNTQ5Ny1jMzFiLTRmNDUtOGIzZi00NDNmODY3ZjIyMjIiXQAABiCfICFD9NinOXgkTqwaQlRNIGiWua18fEWvpC-8IsDWGQ"\ No newline at end of filediff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex 99474d8e24..067ff9a299 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -57,4 +57,9 @@ jobs:npm run build- name: Build Docker image- run: docker build . -t langfuse+ run: |+ docker build \+ --build-arg DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres \+ --build-arg NEXTAUTH_SECRET=mysecret \+ --build-arg NEXTAUTH_URL=http:localhost:3030 \+ -t langfuse .diff --git a/Dockerfile b/Dockerfileindex 9864ea2e6e..ff14ec0aba 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,5 +1,8 @@# Base imageFROM node:18-alpine AS base+ARG DATABASE_URL+ARG NEXTAUTH_SECRET+ARG NEXTAUTH_URL# Install dependencies only when neededFROM base AS depsdiff --git a/README.md b/README.mdindex cadd93ae00..d373019196 100644--- a/README.md+++ b/README.md@@ -28,8 +28,6 @@ Debug and improve your LLM-based application by logging/analyzing all user interFollow the steps below to set up the environment via docker-compose. Both the server and the database will be running in docker containers.```bash-# create env file-cp .env.local.example .env# execute docker-composedocker-compose up```@@ -66,12 +64,18 @@ npm run devThe following instructions explain how to create a single container for deployment. The container will contain the server but no database. Please adjust the db url in the .env file to point to your database.```bash-# create env file-cp .env.dev.example .env# build the container-docker build -t langfuse .+docker build \+--build-arg DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres \+--build-arg NEXTAUTH_SECRET=mysecret \+--build-arg NEXTAUTH_URL=http:localhost:3030 \+-t langfuse .# run the container-docker run -dp 3030:3000 langfuse+docker run \+--env DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres \+--env NEXTAUTH_SECRET=mysecret \+--env NEXTAUTH_URL=http:localhost:3030 \+-dp 3030:3000 langfuse```### Generate SDKsdiff --git a/docker-compose.dev.yml b/docker-compose.dev.ymlindex 7ca890bc84..a1a251314a 100644--- a/docker-compose.dev.yml+++ b/docker-compose.dev.yml@@ -12,6 +12,11 @@ services:- 5432:5432volumes:- database_data:/var/lib/postgresql/data+ networks:+ - langfuse-network++networks:+ langfuse-network:volumes:database_data:diff --git a/docker-compose.yml b/docker-compose.ymlindex 1f77d6137e..dff8ea6593 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -4,6 +4,10 @@ services:server:build:dockerfile: Dockerfile+ args:+ - DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres+ - NEXTAUTH_SECRET=mysecret+ - NEXTAUTH_URL=http:localhost:3030command: ["sh", "-c", "npx prisma migrate deploy && node server.js"]depends_on:- db@@ -12,7 +16,10 @@ services:environment:- NODE_ENV=development- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres- - DIRECT_URL=postgresql://postgres:postgres@db:5432/postgres+ - DIRECT_URL=postgresql://postgres:postgres@db:5432/postgres\+ - NEXTAUTH_SECRET=mysecret+ - NEXTAUTH_URL=http:localhost:3030+db:image: postgresrestart: always