From ad5bd25a52d16abb18999d071cc8b71a404dce48 Mon Sep 17 00:00:00 2001 From: massahito <110250805+massahito@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:56:10 +0900 Subject: [PATCH] feat: refs #233 set-variables-from-envfile --- env-sample | 4 +++- pong/config/settings.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/env-sample b/env-sample index ed122df..83b4022 100644 --- a/env-sample +++ b/env-sample @@ -9,8 +9,10 @@ ADMIN_PANEL_URL=admin_panel_url DJANGO_SUPERUSER_USERNAME=django_superuser_username DJANGO_SUPERUSER_PASSWORD=django_superuser_password DJANGO_SUPERUSER_EMAIL=django_superuser_email -NGINX_ORIGIN=nginx_origin DJANGO_2FA_ISSUER=2fa_issuer +DJANGO_SECRET_KEY="secret" +DJANGO_DEBUG="False" +NGINX_ORIGIN=nginx_origin GF_SECURITY_ADMIN_USER="fuga" GF_SECURITY_ADMIN_PASSWORD="fuga" DISCORD_WEBHOOK="#TODO" diff --git a/pong/config/settings.py b/pong/config/settings.py index 0d52f21..ee1e6e7 100644 --- a/pong/config/settings.py +++ b/pong/config/settings.py @@ -22,10 +22,10 @@ # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "django-insecure-f9o0g5c=(hz*lj*=qppxb4$+l-#2#g)+lr2#2f-#m*8fiskm^#" +SECRET_KEY = os.getenv("DJANGO_SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = os.getenv("DJANGO_DEBUG") ALLOWED_HOSTS = ["*"]