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

chore(docker): set api.environment.DB_URL #664

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sripwoud
Copy link

@sripwoud sripwoud commented Feb 2, 2025

Description

Docker is the most convenient way to get started. As the docker compose files already define a postgres service with migrations applied.
However the environment variables are set with an env_file and the .env.example uses sqlite. Which is confusing.
As a dev:

  • I don;t want to have to deal with DB setup and seeding: that's good you provide a postgres service in docker compose
  • I may run the api with the docker service OR with yarn dev (because i am making changes and don;t want to rebuild the image every time)

Depending on the situation the postgres url will be different (different host: postgres or localhost).
To accomodate for both situations, one needs either to use different .env files (e.g .env.local and .env.docker).
Or one can override the env_file by setting environment.DB_URL in docker compose.
This PR does the latter.

Does this introduce a breaking change?

  • Yes
  • No

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run yarn prettier and yarn lint without getting any errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Important

We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team.

Copy link

vercel bot commented Feb 2, 2025

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

Name Status Preview Comments Updated (UTC)
bandada-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2025 10:23pm
bandada-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2025 10:23pm

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.

1 participant