init
This commit is contained in:
112
provisioning/templates/configuration.py.j2
Normal file
112
provisioning/templates/configuration.py.j2
Normal file
@@ -0,0 +1,112 @@
|
||||
#########################
|
||||
# #
|
||||
# Required settings #
|
||||
# #
|
||||
#########################
|
||||
|
||||
ALLOWED_HOSTS = {{ allowed_hosts | default(['*']) }}
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': '{{ db_name }}',
|
||||
'USER': '{{ db_user }}',
|
||||
'PASSWORD': '{{ db_user_password }}',
|
||||
'HOST': '{{ db_host | default("localhost") }}',
|
||||
'PORT': '{{ db_port | default("") }}',
|
||||
'CONN_MAX_AGE': 300,
|
||||
}
|
||||
}
|
||||
|
||||
REDIS = {
|
||||
'tasks': {
|
||||
'HOST': '{{ redis_host | default("localhost") }}',
|
||||
'PORT': {{ redis_port | default(6379) }},
|
||||
'USERNAME': '',
|
||||
'PASSWORD': '',
|
||||
'DATABASE': 0,
|
||||
'SSL': False,
|
||||
},
|
||||
'caching': {
|
||||
'HOST': '{{ redis_host | default("localhost") }}',
|
||||
'PORT': {{ redis_port | default(6379) }},
|
||||
'USERNAME': '',
|
||||
'PASSWORD': '',
|
||||
'DATABASE': 1,
|
||||
'SSL': False,
|
||||
}
|
||||
}
|
||||
|
||||
SECRET_KEY = '{{ secret_key | replace("\n", "") }}'
|
||||
|
||||
#########################
|
||||
# #
|
||||
# Optional settings #
|
||||
# #
|
||||
#########################
|
||||
|
||||
ADMINS = {{ admins | default([]) }}
|
||||
|
||||
ALLOW_TOKEN_RETRIEVAL = False
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = []
|
||||
|
||||
BASE_PATH = '{{ base_path | default("") }}'
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL = False
|
||||
CORS_ORIGIN_WHITELIST = {{ cors_whitelist | default([]) }}
|
||||
CORS_ORIGIN_REGEX_WHITELIST = {{ cors_regex_whitelist | default([]) }}
|
||||
|
||||
CSRF_COOKIE_NAME = 'csrftoken'
|
||||
|
||||
DEBUG = {{ debug | default(False) }}
|
||||
|
||||
DEFAULT_LANGUAGE = '{{ default_language | default("en-us") }}'
|
||||
|
||||
EMAIL = {
|
||||
'SERVER': '{{ email_server | default("localhost") }}',
|
||||
'PORT': {{ email_port | default(25) }},
|
||||
'USERNAME': '{{ email_username | default("") }}',
|
||||
'PASSWORD': '{{ email_password | default("") }}',
|
||||
'USE_SSL': {{ email_use_ssl | default(False) }},
|
||||
'USE_TLS': {{ email_use_tls | default(False) }},
|
||||
'TIMEOUT': 10,
|
||||
'FROM_EMAIL': '{{ email_from | default("") }}',
|
||||
}
|
||||
|
||||
EXEMPT_VIEW_PERMISSIONS = {{ exempt_view_permissions | default([]) }}
|
||||
|
||||
INTERNAL_IPS = ('127.0.0.1', '::1')
|
||||
|
||||
LOGGING = {}
|
||||
|
||||
LOGIN_PERSISTENCE = False
|
||||
LOGIN_REQUIRED = True
|
||||
LOGIN_TIMEOUT = None
|
||||
LOGIN_FORM_HIDDEN = False
|
||||
LOGOUT_REDIRECT_URL = 'home'
|
||||
|
||||
METRICS_ENABLED = False
|
||||
|
||||
PLUGINS = {{ plugins | default([]) }}
|
||||
|
||||
PLUGINS_CONFIG = {{ plugins_config | default({}) }}
|
||||
|
||||
REMOTE_AUTH_ENABLED = False
|
||||
REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
|
||||
REMOTE_AUTH_HEADER = 'HTTP_REMOTE_USER'
|
||||
REMOTE_AUTH_USER_FIRST_NAME = 'HTTP_REMOTE_USER_FIRST_NAME'
|
||||
REMOTE_AUTH_USER_LAST_NAME = 'HTTP_REMOTE_USER_LAST_NAME'
|
||||
REMOTE_AUTH_USER_EMAIL = 'HTTP_REMOTE_USER_EMAIL'
|
||||
REMOTE_AUTH_AUTO_CREATE_USER = True
|
||||
REMOTE_AUTH_DEFAULT_GROUPS = []
|
||||
REMOTE_AUTH_DEFAULT_PERMISSIONS = {}
|
||||
|
||||
RELEASE_CHECK_URL = None
|
||||
|
||||
RQ_DEFAULT_TIMEOUT = 300
|
||||
|
||||
SESSION_COOKIE_NAME = 'sessionid'
|
||||
SESSION_FILE_PATH = None
|
||||
|
||||
TIME_ZONE = '{{ timezone | default("UTC") }}'
|
||||
Reference in New Issue
Block a user