aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-06 17:35:50 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-06 17:35:50 +0100
commit2947010fe6fe3d54019164f9d8213a2fede55a45 (patch)
tree67796ab10edfa25562019e0e19cfb4075405e4d2 /config
parent22f2d467a5b05e0a878d2c3125ef4f8ee8584f9b (diff)
SETTINGS FOR A GKE DEPLOY - not used
Diffstat (limited to 'config')
-rw-r--r--config/settings/gcloud_settings.py124
1 files changed, 124 insertions, 0 deletions
diff --git a/config/settings/gcloud_settings.py b/config/settings/gcloud_settings.py
new file mode 100644
index 0000000..253a76b
--- /dev/null
+++ b/config/settings/gcloud_settings.py
@@ -0,0 +1,124 @@
+# Copyright 2015 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+
+BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'pf-@jxtojga)z+4s*uwbgjrq$aep62-thd0q7f&o77xtpka!_m'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+# SECURITY WARNING: If you deploy a Django app to production, make sure to set
+# an appropriate host here.
+# See https://docs.djangoproject.com/en/1.10/ref/settings/
+ALLOWED_HOSTS = ['*']
+
+# Application definition
+
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'crispy_forms',
+ 'allauth',
+ 'allauth.account',
+ "ctrack.users.apps.UsersConfig",
+ "ctrack.organisations.apps.OrganisationsConfig",
+ "ctrack.caf.apps.CafConfig",
+ "ctrack.register.apps.RegisterConfig",
+ "ctrack.assessments.apps.AssessmentsConfig",
+ "ctrack.core.apps.CoreConfig",
+)
+
+MIDDLEWARE = (
+ 'django.middleware.security.SecurityMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
+ROOT_URLCONF = 'mysite.urls'
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
+
+WSGI_APPLICATION = "config.wsgi.application"
+
+# Database
+# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
+
+# [START dbconfig]
+DATABASES = {
+ 'default': {
+ # If you are using Cloud SQL for MySQL rather than PostgreSQL, set
+ # 'ENGINE': 'django.db.backends.mysql' instead of the following.
+ 'ENGINE': 'django.db.backends.postgresql',
+ 'NAME': 'ctrack',
+ 'USER': os.getenv('DATABASE_USER'),
+ 'PASSWORD': os.getenv('DATABASE_PASSWORD'),
+ 'HOST': '127.0.0.1',
+ 'PORT': '5432',
+ }
+}
+# [END dbconfig]
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.8/topics/i18n/
+
+LANGUAGE_CODE = 'en-gb'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.8/howto/static-files/
+
+# [START staticurl]
+#STATIC_URL = '/static/'
+STATIC_URL = 'https://storage.googleapis.com/ctrack/static/'
+# [END staticurl]
+
+STATIC_ROOT = 'static/'