Skip to content

Commit

Permalink
fix: dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 5, 2024
1 parent 9fbf7bc commit af0516a
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ celerybeat.pid
*.sage.py

# Environments
.env.local.secrets
.venv
env/.env.local.secrets
env/
venv/
ENV/
env.bak/
Expand Down
6 changes: 3 additions & 3 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def set_up_settings(service_base_dir: Path, service_name: str):
# env = t.cast(Env, os.environ["ENV"])
env = os.environ["ENV"]

load_dotenv(f"env/.env.{env}", override=False)
load_dotenv("env/.env", override=False)
load_dotenv(f".env/.env.{env}", override=False)
load_dotenv(".env/.env", override=False)

if env == "local":
secrets_path = "env/.env.local.secrets"
secrets_path = ".env/.env.local.secrets"
# TODO: move this to the dev container setup script.
if not os.path.exists(secrets_path):
with open(secrets_path, "w+", encoding="utf-8") as secrets_file:
Expand Down

0 comments on commit af0516a

Please sign in to comment.