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

feat(docker): Use .env files for dev environment #455

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

julienbourdeau
Copy link
Contributor

Yesterday, I had troubles with webhooks because I wasn't running the api-webhook-worker service while SIDEKIQ_WEBHOOK was forced to true for all services. See #439

I wanted to make make it easy to turn on and off this feature. I don't want to be running 5 separate workers at all time in dev.

One approach was to use SIDEKIQ_WEBHOOK=${SIDEKIQ_WEBHOOK:-true} but inspired by #452 I thought we could do better.

This PR introduces .env files for docker dev env.

  • .env.development.default holds all the default values.
  • .env.developement is not committed, it's yours. Override any value you want. It's also optional.

The default file is very important because otherwise we can't easily add new env vars. If we had a .env.example that people copy once, they would never get the new value

I'm open to suggestion for the .env file names since there is no standard.

@julienbourdeau julienbourdeau self-assigned this Jan 23, 2025
Copy link
Contributor

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

@julienbourdeau julienbourdeau merged commit 0a67ac0 into main Jan 29, 2025
@julienbourdeau julienbourdeau deleted the feat/improv-dev-env branch January 29, 2025 08:57
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