-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow different configs for different machines
Introduces environment variables template file and tasks related to the environment variables files. You're supposed to create a `.env.local` and a `.env.prod` based on `.env.template`. There's a task that ensures the keys in `.env.template` are also present in the other files. There's another task that sets the environment variables in production. For: #12
- Loading branch information
Showing
10 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# Environment variables: | ||
.env.local | ||
.env.prod | ||
|
||
# Python stuff: | ||
.coverage | ||
.mypy_cache | ||
.pytest_cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export SOME_VAR="Test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ mypy = "*" | |
pytest = "*" | ||
invoke = "*" | ||
coverage = "*" | ||
python-dotenv = "*" | ||
|
||
[requires] | ||
python_version = "3.12" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Environment variables | ||
|
||
There's a `.env.template` file that is the source of truth for | ||
environment variable keys. You're supposed to create a `.env.local` file | ||
and a `.env.prod` file based on `.env.template`. The keys in each | ||
environment variable file should stay the same at all times. This is | ||
enforced programmatically using Invoke tasks. (See the `tasks.py` file | ||
for more details on this.) The values of the keys can differ between | ||
files, of course. | ||
|
||
When you deploy to production, the production environment variables are | ||
automatically uploaded to production. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters