Skip to content

Commit

Permalink
github actions: Create a new settings file for the public dev site
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Sep 11, 2024
1 parent a90c201 commit 2ff84f3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:
--log-driver 'json-file' \
--log-opt max-size=100m \
--log-opt max-file=3 \
-e DJANGO_SETTINGS_MODULE='iati.settings.dev' \
-e DJANGO_SETTINGS_MODULE='iati.settings.dev_public' \
-e SECRET_KEY='${{ secrets.DEV_SECRET_KEY }}' \
-e DATABASE_NAME='${{ secrets.DEV_DATABASE_NAME }}' \
-e DATABASE_USER='${{ secrets.DEV_DATABASE_USER }}' \
Expand Down
34 changes: 34 additions & 0 deletions iati/settings/dev_public.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Settings for the public dev environment (overrides base settings).
DEBUG is False etc. because the website is publicly accessible.
"""

import os
from .base import * # noqa: F401, F403 # pylint: disable=unused-wildcard-import, wildcard-import

DEBUG = False

# SECURITY WARNING: keep the secret key used in production secret!
# Overwrite this variable in local.py with another unguessable string.
SECRET_KEY = os.environ.get('SECRET_KEY')

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

ALLOWED_HOSTS = [
'0.0.0.0',
'iatistandard.org',
'.iatistandard.org',
]

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

SECURE_SSL_REDIRECT = not DEBUG
CSRF_COOKIE_SECURE = not DEBUG
SESSION_COOKIE_SECURE = not DEBUG

AZURE_ACCOUNT_NAME = os.getenv('AZURE_ACCOUNT_NAME')

try:
from .local import * # # noqa: F401, F403 # pylint: disable=unused-wildcard-import, wildcard-import
except ImportError:
pass

0 comments on commit 2ff84f3

Please sign in to comment.