-
Notifications
You must be signed in to change notification settings - Fork 2
Settings
Django uses a settings file for configuration, which is plain Python code. VariantGrid uses this to configure optional features, eg:
USE_FEATURE_ONE = True
then in code:
from django.conf import settings
if settings.USE_FEATURE_ONE:
# feature_one(data)
To change settings in different deployments, we load settings from a Python module at variantgrid/settings/env/$(hostname).py
The top of this file should import the default settings, eg:
from variantgrid.settings.components.celery_settings import *
from variantgrid.settings.components.default_settings import *
from variantgrid.settings.components.seqauto_settings import *
Further lines can be used to add or alter any settings you need.
Only use settings "env" dir for server deployments
For developer settings - you can keep these out of source control by putting them in variantgrid/settings/env_developers
rather than env
(this is hidden via Git ignore)
It is strongly encouraged to keep secret settings (user/passwords etc) out of source control, and load them via environment variable or in
/etc/variantgrid/settings_config.json
.
{
"DB": {
"host": "localhost",
"name": "snpdb",
"user": "snpdb",
"password": "snpdb"
},
"CELERY": {
"broker_url": "amqp://guest:guest@localhost"
},
"CLINGEN_ALLELE_REGISTRY": {
"login": "variantgrid",
"password": "cl1ng3n_VG"
},
"ROLLBAR": {
"access_token": "908d7bc42049497494d408f7fb9ee6a5",
"client_access_token": "73c2b9b06f4a433d8d1496ae72e42f1e"
},
"ENTREZ": {
"api_key": None,
"email": None
}
}
Please see the file "secret_settings.py" for further options.