diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f5c0b3..69b9bec 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -21,6 +21,8 @@ jobs: envkey_POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} envkey_CERTBOT_EMAIL: ${{ secrets.CERTBOT_EMAIL }} envkey_CERTBOT_DOMAIN: ${{ secrets.CERTBOT_DOMAIN }} + envkey_DEBUG: ${{ secrets.DEBUG }} + envkey_SECRET_KEY: ${{ secrets.SECRET_KEY }} file_name: .env fail_on_empty: false diff --git a/db.sqlite3 b/db.sqlite3 index 4599449..4d0e0f1 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/index/__pycache__/views.cpython-310.pyc b/index/__pycache__/views.cpython-310.pyc index 700c9bf..6ae1463 100644 Binary files a/index/__pycache__/views.cpython-310.pyc and b/index/__pycache__/views.cpython-310.pyc differ diff --git a/project/__pycache__/settings.cpython-310.pyc b/project/__pycache__/settings.cpython-310.pyc index 11d8de2..122d82f 100644 Binary files a/project/__pycache__/settings.cpython-310.pyc and b/project/__pycache__/settings.cpython-310.pyc differ diff --git a/project/settings.py b/project/settings.py index 343ff96..8263222 100644 --- a/project/settings.py +++ b/project/settings.py @@ -11,7 +11,10 @@ """ import os +from dotenv import load_dotenv +# Load environment variables from .env file +load_dotenv() # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -20,10 +23,10 @@ # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = 'unb1m%jfh^3zb^5x&jweq$-^dfi1_3m_sze%80osq0xu+c@b@!' +SECRET_KEY = os.environ.get('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = os.environ.get('DEBUG') ALLOWED_HOSTS = ['*'] @@ -118,6 +121,7 @@ # https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_URL = '/static/' + STATIC_ROOT = os.path.join(BASE_DIR, 'static') MEDIA_URL = '/media_cdn/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media_cdn') \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index c8ae548..e2a0446 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ idna==3.4 Pillow==9.1.1 psycopg2==2.9.3 psycopg2-binary==2.9.3 +python-dotenv==1.0.1 pytz==2022.7.1 requests==2.28.2 sqlparse==0.4.3 diff --git a/templates/index.html b/templates/index.html index f2ab98e..5f40d44 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@