thatDC
thatDC
LLangfuse
Created by thatDC on 2/8/2024 in #self-host-discussion
Docker compose issues
Yes, I sent a message yesterday in the chat, just before experiencing this issue. Basically Langfuse cannot reach the DB I set up on postgres. The dedicated postgres is not on another container, but installed with apt-get
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "langfuse", schema "public" at "localhost:5432"

Applying database migrations failed. This is mostly caused by the database being unavailable.
Exiting...
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "langfuse", schema "public" at "localhost:5432"

Applying database migrations failed. This is mostly caused by the database being unavailable.
Exiting...
12 replies
LLangfuse
Created by thatDC on 2/8/2024 in #self-host-discussion
Docker compose issues
If possible I'd like to go back to the Docker standard deployment, which should be more secure and stable, as stated in Langfuse doc
12 replies
LLangfuse
Created by thatDC on 2/8/2024 in #self-host-discussion
Docker compose issues
version: "3.5"

services:
langfuse-server:
image: ghcr.io/langfuse/langfuse:latest
depends_on:
- db
ports:
- "3031:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
- NEXTAUTH_SECRET=mysecret
- SALT=mysalt
- NEXTAUTH_URL=<server_url>
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-true}
- NEXT_PUBLIC_SIGN_UP_DISABLED=${NEXT_PUBLIC_SIGN_UP_DISABLED:-false}
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}

db:
image: postgres
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- 5432:5432
volumes:
- database_data:/var/lib/postgresql/data

volumes:
database_data:
driver: local
version: "3.5"

services:
langfuse-server:
image: ghcr.io/langfuse/langfuse:latest
depends_on:
- db
ports:
- "3031:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
- NEXTAUTH_SECRET=mysecret
- SALT=mysalt
- NEXTAUTH_URL=<server_url>
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-true}
- NEXT_PUBLIC_SIGN_UP_DISABLED=${NEXT_PUBLIC_SIGN_UP_DISABLED:-false}
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}

db:
image: postgres
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- 5432:5432
volumes:
- database_data:/var/lib/postgresql/data

volumes:
database_data:
driver: local
Changed to port 3031 for other reasons. By the way, Langfuse is now working, I am just a little confused on the FATAL message showing up in the logs.
12 replies