From d7cf52d989ea091e75dfd4054d9b704ca5cf3d94 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 5 Dec 2024 15:35:11 +0000 Subject: [PATCH] fix: env dir --- .gitignore | 3 +-- {.env => env}/.env | 0 {.env => env}/.env.development | 0 {.env => env}/.env.local | 0 {.env => env}/.env.production | 0 {.env => env}/.env.staging | 0 settings.py | 6 +++--- 7 files changed, 4 insertions(+), 5 deletions(-) rename {.env => env}/.env (100%) rename {.env => env}/.env.development (100%) rename {.env => env}/.env.local (100%) rename {.env => env}/.env.production (100%) rename {.env => env}/.env.staging (100%) diff --git a/.gitignore b/.gitignore index 5778e03..5e2cec9 100644 --- a/.gitignore +++ b/.gitignore @@ -125,9 +125,8 @@ celerybeat.pid *.sage.py # Environments -.env.local.secrets .venv -env/ +env/.env.local.secrets venv/ ENV/ env.bak/ diff --git a/.env/.env b/env/.env similarity index 100% rename from .env/.env rename to env/.env diff --git a/.env/.env.development b/env/.env.development similarity index 100% rename from .env/.env.development rename to env/.env.development diff --git a/.env/.env.local b/env/.env.local similarity index 100% rename from .env/.env.local rename to env/.env.local diff --git a/.env/.env.production b/env/.env.production similarity index 100% rename from .env/.env.production rename to env/.env.production diff --git a/.env/.env.staging b/env/.env.staging similarity index 100% rename from .env/.env.staging rename to env/.env.staging diff --git a/settings.py b/settings.py index 4c17046..5923ea4 100644 --- a/settings.py +++ b/settings.py @@ -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: