Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add shadow database host configuration#2989

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
nzlz wants to merge1 commit intosupabase:develop
base:develop
Choose a base branch
Loading
fromaware-network:nzlz/shadow_host

Conversation

nzlz
Copy link

  • Add ShadowHost config option to control shadow database connection
  • Default to Hostname if ShadowHost not set

The scenario is the following:

  • local supabase deployment, self hosted.
  • running migrations inside our own container which has supa running via docker compose.
  • attempt supabasedb diff --db-url ...

This does not work since the docker running the shadow database is created on host, and 127.0.0.1 for host network is not accessible from inside our container.

In my case, i set the following in the config.toml >>shadow_host = "172.18.0.1" and now db diff works.

(open to alternative solutions!)

- Add ShadowHost config option to control shadow database connection- Default to Hostname if ShadowHost not set
@nzlznzlz requested a review froma team as acode ownerDecember 19, 2024 11:08
@coveralls
Copy link

Pull Request Test Coverage Report forBuild 12411481695

Details

  • 7 of7(100.0%) changed or added relevant lines in2 files are covered.
  • 5 unchanged lines in1 file lost coverage.
  • Overall coverage decreased (-0.008%) to59.736%

Files with Coverage ReductionNew Missed Lines%
internal/gen/keys/keys.go512.9%
TotalsCoverage Status
Change from baseBuild 12406922166:-0.008%
Covered Lines:7657
Relevant Lines:12818

💛 -Coveralls

@sweatybridge
Copy link
Contributor

sweatybridge commentedDec 30, 2024
edited
Loading

This does not work since the docker running the shadow database is created on host, and 127.0.0.1 for host network is not accessible from inside our container.

The shadow db container is always created using dockerhost network mode, so 127.0.0.1 should resolve to your host network from inside the container. I suspect the root cause is something else.

Could you try the following and let me know if there's any error?

DOCKER_HOST=172.18.0.1 supabase db diff --db-url ...

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@nzlz@coveralls@sweatybridge

[8]ページ先頭

©2009-2025 Movatter.jp