Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to database using internal url #561

Closed
joshfester opened this issue Oct 16, 2024 · 2 comments
Closed

Cannot connect to database using internal url #561

joshfester opened this issue Oct 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joshfester
Copy link

To Reproduce

  1. Create a postgres database
  2. Create a Ruby on Rails app in the same project
  3. Set the DATABASE_URL env variable to the internal postgres url

Current vs. Expected behavior

When trying to deploy a Rails app using nixpacks, I get this error:

PG::ConnectionBad: could not translate host name "northcentralai-postgres-031ff5" to address: Name or service not known (PG::ConnectionBad)

Is there some extra step to make the postgres host name available to the rails app?

Provide environment information

OS: Ubuntu 24.04
Host: Hetzner
Dokploy: 0.10.0
Postgres Image: postgres:16
Ruby: 3.3.5

Which area(s) are affected? (Select all that apply)

Application, Databases

Additional context

No response

@joshfester joshfester added the bug Something isn't working label Oct 16, 2024
@joshfester
Copy link
Author

I tried switching the builder to use a Dockerfile and I tried Heroku Buildpacks. Both ran into the same issue connecting to the database

@Siumauricio
Copy link
Contributor

Duplicate of #507

@Siumauricio Siumauricio marked this as a duplicate of #507 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants