Jump to content

[Support] jj9987 - PostgreSQL


Recommended Posts

1 hour ago, Braulio Dias Ribeiro said:

 

How can I connect postgres to another docker?
What do I need to type in the PATH?

 

02.png

01.png

If both containers (the application and postgresql) are in the same custom network, you can connect using postgresql container's (host)name. If you are using host networking, you will need to use the host IP.

Link to comment
14 hours ago, jj9987 said:

If both containers (the application and postgresql) are in the same custom network, you can connect using postgresql container's (host)name. If you are using host networking, you will need to use the host IP.

 

They are on the same network.
But I don't know how to set username and password. Is that it?

 

postgresql://USER:PASSWORD@Postgres:5432/langflow

 

image.png.833fe77f4631fae126d37c8513bccf0e.png

 

Link to comment
On 9/5/2024 at 9:59 AM, Braulio Dias Ribeiro said:

 

They are on the same network.
But I don't know how to set username and password. Is that it?

 

postgresql://USER:PASSWORD@Postgres:5432/langflow

 

image.png.833fe77f4631fae126d37c8513bccf0e.png

 

If you are using the official PostgreSQL image, then you can configure the initial superuser using POSTGRES_USER and POSTGRES_PASSWORD environment variables for username/password and POSTGRES_DB for database name. For simplicity purposes, you can use these.

 

But it is recommended to connect with the superuser to the database and create a custom user and database for the application. You can follow PostgreSQL documentation for that, but the basics should be:

 

CREATE USER 'user' WITH ENCRYPTED PASSWORD 'password';
CREATE DATABASE 'database' WITH OWNER 'user';


 

Edited by jj9987
Link to comment
38 minutes ago, jj9987 said:

If you are using the official PostgreSQL image, then you can configure the initial superuser using POSTGRES_USER and POSTGRES_PASSWORD environment variables for username/password and POSTGRES_DB for database name. For simplicity purposes, you can use these.

 

But it is recommended to connect with the superuser to the database and create a custom user and database for the application. You can follow PostgreSQL documentation for that, but the basics should be:

 

CREATE USER 'user' WITH ENCRYPTED PASSWORD 'password';
CREATE DATABASE 'database' WITH OWNER 'user';


 

I wanted to know how to fill in this path, if this was right. I found the answer, here's the solution.
LANGFLOW_DATABASE_URL = postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}

In my case
postgresql://langflow:PASSWORD@Postgres:5432/langflow

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...