You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a similar open issue: No PostgreSQL driver in docker image for 1.0.16, which was last updated on August 22, 2024. The suggested solution is to modify the pyproject.toml file to include psycopg[binary]:
This change ensures that the binary version of the psycopg package is used, which can help with compatibility and performance.
Additionally, to resolve the issue with the Docker image, you can create a custom Dockerfile that installs the psycopg2 module. Here is an example:
Create a Dockerfile for the Langflow service:
FROM langflowai/langflow:1.0-alpha
# Install psycopg2RUN pip install psycopg2-binary
# Copy the rest of your application code if needed# COPY . /app# Set the working directoryWORKDIR /app
# Expose the necessary portEXPOSE 7860
# Define the entry pointCMD ["python", "-m", "langflow", "run"]
Modify the docker-compose.yml to use the custom Dockerfile:
By building a custom Docker image that includes the psycopg2 module, you should be able to connect to the PostgreSQL database without encountering the ModuleNotFoundError[1][2].
For now, if you can manually install the psycopg2 dependency in your container, I believe you should be able to continue your work until the problem is resolved
Bug Description
Running
docker run -d langflowai/langflow:1.0.16
works just fine, but if you specify-e LANGFLOW_DATABASE_URL=postgres://...
you get errors:
Reproduction
Start a Docker instance for v1.0.16 that connects to a Postgres database using the
LANGFLOW_DATABASE_URL
environment vairable.Expected behavior
Container starts and Langflow service runs as normal :)
Who can help?
No response
Operating System
Langflow Docker image
Langflow Version
1.0.16
Python Version
3.12
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: