From 41da1ce286dff93bc7233dbae96d8167468cb262 Mon Sep 17 00:00:00 2001 From: aabboudi Date: Tue, 10 Sep 2024 17:05:21 +0100 Subject: [PATCH] Updated deployment settings --- .github/workflows/deploy.yml | 15 ++- core/prod_settings.py | 12 +-- requirements.txt | Bin 920 -> 1020 bytes ui/templates/components/footer.html | 139 ++++++++++++---------------- ui/templates/components/navbar.html | 8 +- ui/templates/index.html | 7 +- 6 files changed, 88 insertions(+), 93 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a48fc40..ffd514e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,19 @@ jobs: build: runs-on: ubuntu-latest + env: + SECRET_KEY: ${{ secrets.SECRET_KEY }} + AZURE_ACCOUNT_NAME: ${{ secrets.AZURE_ACCOUNT_NAME }} + AZURE_ACCOUNT_KEY: ${{ secrets.AZURE_ACCOUNT_KEY }} + AZURE_CONTAINER: ${{ secrets.AZURE_CONTAINER }} + EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }} + EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }} + DEFAULT_FROM_EMAIL: ${{ secrets.DEFAULT_FROM_EMAIL }} + DATABASE_NAME: ${{ secrets.DATABASE_NAME }} + DATABASE_USER: ${{ secrets.DATABASE_USER }} + DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} + DATABASE_HOST: ${{ secrets.DATABASE_HOST }} + steps: - uses: actions/checkout@v4 @@ -46,7 +59,7 @@ jobs: cd .. - name: Collect static files - run: python manage.py collectstatic --noinput + run: python manage.py collectstatic --noinput --settings=core.prod_settings.py - name: Zip artifact for deployment run: zip release.zip ./* -r diff --git a/core/prod_settings.py b/core/prod_settings.py index 817f464..ab2aaef 100644 --- a/core/prod_settings.py +++ b/core/prod_settings.py @@ -10,12 +10,12 @@ 'https://'+os.environ['WEBSITE_HOSTNAME'], ] -SECURE_HSTS_SECONDS = 31536000 # 1 year -SECURE_HSTS_INCLUDE_SUBDOMAINS = True -SECURE_HSTS_PRELOAD = True -SECURE_SSL_REDIRECT = True -SESSION_COOKIE_SECURE = True -CSRF_COOKIE_SECURE = True +# SECURE_HSTS_SECONDS = 31536000 # 1 year +# SECURE_HSTS_INCLUDE_SUBDOMAINS = True +# SECURE_HSTS_PRELOAD = True +# SECURE_SSL_REDIRECT = True +# SESSION_COOKIE_SECURE = True +# CSRF_COOKIE_SECURE = True DATABASES = { 'default': { diff --git a/requirements.txt b/requirements.txt index 1d7fb6ae86099145a583f284f04cd093ba281325..3e00160a6e53b4a261e159f1dac3f4be15fb11d5 100644 GIT binary patch delta 92 zcmbQi{)c@750i2(LnT8oLm@*BLoyI&GNdx(F_bXa0-+Iu9vGWUW@oBYPXvmlGL!R diff --git a/ui/templates/components/footer.html b/ui/templates/components/footer.html index aac8a69..d91da51 100644 --- a/ui/templates/components/footer.html +++ b/ui/templates/components/footer.html @@ -1,87 +1,70 @@ -