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

fix(docker) nextjs unable to connect to db #6119

Conversation

joewired
Copy link
Contributor

@joewired joewired commented Dec 8, 2024

To connect to the nextjs-monorepo-example-db container from the nextjs-app container both containers need to be in the same docker network. Otherwise, you get a connection error.

The service name main-db as the hostname when they are in the same network.

Copy link

vercel bot commented Dec 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
monorepo-nextjs-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2024 1:25am

Copy link

changeset-bot bot commented Dec 8, 2024

⚠️ No Changeset found

Latest commit: a3495b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 8, 2024

Someone is attempting to deploy a commit to the belgattitude's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codeclimate bot commented Dec 8, 2024

Code Climate has analyzed commit a3495b8 and detected 0 issues on this pull request.

View more on Code Climate.

@joewired joewired changed the title Fix(docker) nextjs unable to connect to db fix(docker) nextjs unable to connect to db Dec 8, 2024
@belgattitude
Copy link
Owner

Nice ! Thank you

@belgattitude belgattitude merged commit 25c257d into belgattitude:main Dec 10, 2024
6 of 8 checks passed
@joewired joewired deleted the fix(docker)-nextjs-unable-to-connect-to-db branch December 12, 2024 22:46
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