From 075a7426bf14d799082255987d7372ee48c01281 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Mon, 24 Jul 2023 20:43:31 +0200 Subject: [PATCH] Pull out env variables into .env file --- .gitignore | 2 ++ Deployment/Live/.env.example | 7 +++++++ Deployment/Live/docker-compose.yml | 9 ++------- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 Deployment/Live/.env.example diff --git a/.gitignore b/.gitignore index 80cc11d..8753a12 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ __pycache__ clubhaus/static/**/* .DS_Store django.log +*.db +.env # Created by https://www.toptal.com/developers/gitignore/api/jetbrains # Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains diff --git a/Deployment/Live/.env.example b/Deployment/Live/.env.example new file mode 100644 index 0000000..f5d94c5 --- /dev/null +++ b/Deployment/Live/.env.example @@ -0,0 +1,7 @@ +SECRET_KEY= +ALLOWED_HOSTS=clubhaus-schornbach.de +CSRF_TRUSTED_ORIGINS=https://clubhaus-schornbach.de +SESSION_COOKIE_SECURE=True +IP_RATE_LIMIT_TIME=3600 +DEBUG_MODE=False +LC_ALL=de_DE.UTF-8 \ No newline at end of file diff --git a/Deployment/Live/docker-compose.yml b/Deployment/Live/docker-compose.yml index 76783f0..1647b63 100644 --- a/Deployment/Live/docker-compose.yml +++ b/Deployment/Live/docker-compose.yml @@ -10,12 +10,7 @@ services: command: gunicorn clubhaus.wsgi:application --bind 0.0.0.0:12000 volumes: - ../../clubhaus:/usr/src/app - environment: - - ALLOWED_HOSTS=clubhaus-schornbach.de - - CSRF_TRUSTED_ORIGINS=https://clubhaus-schornbach.de - - SESSION_COOKIE_SECURE=True - - IP_RATE_LIMIT_TIME=3600 - - DEBUG_MODE=False - - LC_ALL=de_DE.UTF-8 + env_file: + - .env ports: - "127.0.0.1:12000:12000"