Commit 254b282f authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds environment variables and secret for settings

parent 1a37ad10
Pipeline #8640781 passed with stage
in 2 minutes and 5 seconds
......@@ -13,5 +13,4 @@ site_media/dataset
site_media/pdb_alignments
site_media/Quantification
CLMSVault_clean_2017-03-02.db
CLMSVault/settings/production.py
CLMSVault/settings/local.py
# # Copyright 2013-2017 Mathieu Courcelles
# # Mike Tyers's lab / IRIC / Universite de Montreal
# Import standard librariesdjang
# Import Django related libraries
# Import project libraries
from .base import *
from ..secrets import get_secret
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
(os.environ.get('ADMIN_NAME', ''), os.environ.get('ADMIN_EMAIL', '')),
)
MANAGERS = ADMINS
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = get_secret('SECRET_KEY')
# Mail server configuration
EMAIL_USE_TLS = True
EMAIL_HOST = os.environ.get('EMAIL_HOST', '')
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER', '')
EMAIL_HOST_PASSWORD = get_secret('EMAIL_HOST_PASSWORD')
EMAIL_PORT = 587
EMAIL_SUBJECT_PREFIX = '[CLMSVault] '
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split()
ALLOWED_HOSTS.append('0.0.0.0')
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'HOST': os.environ.get('MYSQL_HOST', ''),
'NAME': os.environ.get('MYSQL_DB', ''),
'USER': os.environ.get('MYSQL_USER', ''),
'PASSWORD': get_secret('MYSQL_PASSWORD'),
'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
}
}
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Montreal'
PERCOLATOR_BIN = r'/usr/bin/percolator'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment