File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ celerybeat.pid
125
125
* .sage.py
126
126
127
127
# Environments
128
- .env.secrets
128
+ .env.local. secrets
129
129
.venv
130
130
env /
131
131
venv /
Original file line number Diff line number Diff line change @@ -69,7 +69,21 @@ def set_up_settings(service_name: str):
69
69
load_dotenv (".env/.env" , override = False )
70
70
71
71
if env == "local" :
72
- _secrets = dotenv_values (".env/.env.local.secrets" )
72
+ secrets_path = ".env/.env.local.secrets"
73
+ # TODO: move this to the dev container setup script.
74
+ if not os .path .exists (secrets_path ):
75
+ with open (secrets_path , "w+" , encoding = "utf-8" ) as secrets_file :
76
+ secrets_file .write (
77
+ "# 📝 Local Secret Variables 📝\n "
78
+ "# These secret variables are only loaded in your local environment (on your PC).\n "
79
+ "#\n "
80
+ "# This file is git-ignored intentionally to keep these variables a secret.\n "
81
+ "#\n "
82
+ "# 🚫 DO NOT PUSH SECRETS TO THE CODE REPO 🚫\n "
83
+ "\n "
84
+ )
85
+
86
+ _secrets = dotenv_values (secrets_path )
73
87
else :
74
88
_AWS_S3_APP_BUCKET = os .environ ["aws_s3_app_bucket" ]
75
89
_AWS_S3_APP_FOLDER = os .environ ["aws_s3_app_folder" ]
You can’t perform that action at this time.
0 commit comments