Closed Bug 1391637 Opened 7 years ago Closed 7 years ago

figure out local development configuration override

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

Attachments

(1 file)

The webapp uses python-decouple, so you can create a webapp-django/.env file, put settings in there, and those values override the ones from the environment and the settings file.

That's great, but doesn't work across the whole project.

We need a way to override environment and behavioral configuration across all the components from a single file that isn't checked into the repository. This lets developers adjust configuration for their specific setup, set up Google auth, use API tokens, and other things.

This bug covers figuring out how that will work, implementing it, and documenting it.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Commit pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/c514d901653d0ee9896d41bcb2a52b62822e54d9
fixes bug 1391637 - add my.env to override variables in local dev environment (#3926)

my.env will work across all components--not just the webapp. Further, variables
defined in it will work for running one-off scripts, too.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
That PR created a my.env file that sits in the root of the repository and holds variables that:

1. are specific to that person's development environment (e.g. the person's API_TOKEN for -prod, the person's Google auth credentials, and so on)

2. override environment variables set in other files for that person's development environment (e.g. for testing some new behavior, experimenting with different line-up of crash storage, running components against a db/s3/whatever that's not part of the docker environment, and so on)


The my.env works for *all* docker-compose run components (crontabber, webapp, processor, and others) and one-off scripts.

Pretty sure that covers all our needs without being overly annoying.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: