Skip to content

[BUG] DATABASE_URI has wrong logic #3438

@Jurrer

Description

@Jurrer

What happened?

Hello, using the default DATABASE_URI: postgresql://username:password@postgresql:5432/database format which is provided from the docs does not work.
It is a very frustrating first time user experience, as I had everything set up correctly with existing postgres instance and was troubleshooting everything except this env var.

I was getting error

[UI] [26] [❌] - Can't connect to database after 60 seconds: (psycopg.OperationalError) failed to resolve host 'postgresql+psycopg': [Errno -2] Name does not resolve
(Background on this error at: https://sqlalche.me/e/20/e3q8)

The solution was to use postgresql+psycopg://username:password@postgresql:5432/database
No idea why, I guess I had a good hunch.

How to reproduce?

Use the DATABASE_URI: postgresql://username:password@postgresql:5432/database with a correctly set up db, provisioned database and grand db user all permissions on the db.

Configuration file(s) (yaml or .env)

First time setup, default config
DATABASE_URI: `postgresql://username:password@postgresql:5432/database`

Relevant log output

[UI] [26] [❌] - Can't connect to database after 60 seconds: (psycopg.OperationalError) failed to resolve host 'postgresql+psycopg': [Errno -2] Name does not resolve
(Background on this error at: https://sqlalche.me/e/20/e3q8)

BunkerWeb version

1.6.9

What integration are you using?

Docker

Linux distribution (if applicable)

No response

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions