Postgres Migration Problem
Hey Folks,
I'm trying setting up the self hosted version of your very promising tool but run in some problems:
1. Do you have a Docker Image made for ARM Architecture? Or have it planned to do so? (WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
2. When I try to set up the docker, the database migration fails with:
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "localhost:5432"
Applying database migrations failed. Exiting...
Are there more requierements for the postgres DB (do I have to create a database I'm not aware of or anything?)?
I'm super curious to implement your tool in my project! Please help me do so 🙂
13 Replies
Ps.
I'm running this docker command:
docker run --name langfuse \
-e DATABASE_URL=postgresql://postgres:XXXX@localhost:5432 \
-e NEXTAUTH_URL=http://localhost:3000 \
-e NEXTAUTH_SECRET=XXXX= \
-e SALT=mysalt \
-p 3000:3000 \
-a STDOUT
and the database url is verified by running it with
psql "postgresql://postgres:xxxx@localhost:5432" -> postgres=#
Pps.
Now I tried to build the container myself as described in https://langfuse.com/docs/deployment/local
Set Up works buitiful but then the Log In Page appears.
Not very suprisingly, my langfuse credentials don't work (since I'm running it local), I guess the password would be the one I set in the docker_compose as
NEXTAUTH_SECRET= XXXX
But which user does the password belong toLocal Machine - Langfuse
Self-hosting instructions for Langfuse using Docker
Thanks for just booking 15 min, let’s debug together and fix the docs accordingly!
Hey I found a solution!
The problem was, that the database could'nt be seen by the container. I needed to replace the 'localhost' with docker.host.internal in my database connection string.
Happy to hear that
@Marc is there a docker image for linux/arm64 ?
Not yet. There is an open issue tracking this. What’s your use case for it?
I'm using aws cloud and graviton instances for application which requires arm64 architecture image.
Understood
Is there a reason why you want to use graviton instances to run the langfuse container?
Not specific to langfuse but in general graviton instances are cheaper compared to non-graviton instances.
Yep agree, happy to support a PR on this, this is tracked here: https://github.com/langfuse/langfuse/issues/452
GitHub
feat: Publish arm64 compatible docker images · Issue #452 · langfus...
Describe the feature you'd like to request Would love to see arm64 compatible docker images that we can deploy to AWS graviton instances! Describe the solution you'd like to see Building mu...
Hi, I've been having the same issue for a while, solved with solution you've suggested. Just wanted emphasize for others as a reference.
Thanks for sharing, the docker compose file is probably a good reference for this setup as it also includes docker internal networking