Skip to content

Update .env.example for app to gat a connection to the db and also used the valtaibles#628

Open
hamachersim wants to merge 3 commits intooss-apps:mainfrom
hamachersim:patch-1
Open

Update .env.example for app to gat a connection to the db and also used the valtaibles#628
hamachersim wants to merge 3 commits intooss-apps:mainfrom
hamachersim:patch-1

Conversation

@hamachersim
Copy link
Copy Markdown

🔧 Fix database connection configuration

Description

This PR updates the .env.example to correct the PostgreSQL connection configuration for Docker-based setups.

Previously, the DATABASE_URL pointed to localhost, which breaks containerized deployments where the database runs in a separate Docker service. This update ensures the application correctly connects to the splitpro-db service inside the Docker network.


Changes

✅ Updated .env.example

Old configuration:

POSTGRES_PASSWORD="strong-password"
POSTGRES_DB="splitpro"
POSTGRES_PORT=5432
DATABASE_URL="postgresql://postgres:strong-password@localhost:5432/splitpro"

New configuration:

POSTGRES_USER="postgres"
POSTGRES_PASSWORD="strong-password"
POSTGRES_DB="splitpro"
POSTGRES_PORT=5432
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@splitpro-db:5432/${POSTGRES_DB}

changed the db URL to get connection
@krokosik
Copy link
Copy Markdown
Collaborator

Right, localhost is for dev, sorry about that. Actually, the composite string is also an issue on dev, as prisma does not do interpolation.

Could you update the PR to have a commented out dev version (with localhost and literal values)?

@hamachersim
Copy link
Copy Markdown
Author

Hey, I have updated the URLs accordingly. Let me know if you'd like me to change them again. Kind regards, Simon

Comment thread .env.example Outdated
Comment thread .env.example Outdated
@hamachersim
Copy link
Copy Markdown
Author

Hey, I did it. Sorry for the misunderstanding. Kind regards, Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants