django-orchestra/orchestra/settings.py

93 lines
2.3 KiB
Python
Raw Normal View History

2015-04-27 14:54:17 +00:00
from django.core.validators import validate_email
from django.utils.translation import gettext_lazy as _
2014-05-08 16:59:35 +00:00
2015-05-04 19:52:53 +00:00
from orchestra.contrib.settings import Setting
2015-05-03 17:44:46 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_BASE_DOMAIN = Setting('ORCHESTRA_BASE_DOMAIN',
'orchestra.lan',
help_text=("Base domain name used for other settings.<br>"
"If you're editing the settings via the admin interface <b>it is advisable to "
"commit this change before changing any other variables which could be affected</b>.")
)
2015-04-26 13:53:00 +00:00
ORCHESTRA_SITE_URL = Setting('ORCHESTRA_SITE_URL',
'https://orchestra.%s' % ORCHESTRA_BASE_DOMAIN,
2015-04-26 13:53:00 +00:00
help_text=_("Domain name used when it will not be possible to infere the domain from a request."
2015-04-27 14:54:17 +00:00
"For example in periodic tasks.<br>"
"Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.")
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_SITE_NAME = Setting('ORCHESTRA_SITE_NAME',
'orchestra',
)
2014-05-08 16:59:35 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_SITE_VERBOSE_NAME = Setting('ORCHESTRA_SITE_VERBOSE_NAME',
2015-04-27 14:54:17 +00:00
"%s Hosting Management" % ORCHESTRA_SITE_NAME.capitalize(),
help_text="Uses <tt>ORCHESTRA_SITE_NAME</tt> by default."
)
2014-05-08 16:59:35 +00:00
2015-04-26 13:53:00 +00:00
2014-05-08 16:59:35 +00:00
# Service management commands
ORCHESTRA_START_SERVICES = Setting('ORCHESTRA_START_SERVICES',
default=(
'postgresql',
2015-10-01 17:11:05 +00:00
# 'celeryevcam',
# 'celeryd',
# 'celerybeat',
('uwsgi', 'nginx'),
),
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_RESTART_SERVICES = Setting('ORCHESTRA_RESTART_SERVICES',
default=(
2015-10-01 17:11:05 +00:00
# 'celeryd',
# 'celerybeat',
'uwsgi'
),
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_STOP_SERVICES = Setting('ORCHESTRA_STOP_SERVICES',
default=(
('uwsgi', 'nginx'),
2015-10-01 17:11:05 +00:00
# 'celerybeat',
# 'celeryd',
# 'celeryevcam',
'postgresql'
),
)
2014-05-13 13:46:40 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_API_ROOT_VIEW = Setting('ORCHESTRA_API_ROOT_VIEW',
'orchestra.api.root.APIRoot'
)
2014-10-24 10:16:46 +00:00
ORCHESTRA_SSH_DEFAULT_USER = Setting('ORCHESTRA_SSH_DEFAULT_USER',
'root'
)
2015-04-26 13:53:00 +00:00
ORCHESTRA_DEFAULT_SUPPORT_FROM_EMAIL = Setting('ORCHESTRA_DEFAULT_SUPPORT_FROM_EMAIL',
2015-04-27 14:54:17 +00:00
'support@{}'.format(ORCHESTRA_BASE_DOMAIN),
validators=[validate_email],
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default."
)
2015-04-26 13:53:00 +00:00
ORCHESTRA_EDIT_SETTINGS = Setting('ORCHESTRA_EDIT_SETTINGS',
True
)
2015-05-11 14:22:36 +00:00
ORCHESTRA_SSH_CONTROL_PATH = Setting('ORCHESTRA_SSH_CONTROL_PATH',
'~/.ssh/orchestra-%r-%h-%p',
help_text='Location for the control socket used by the multiplexed sessions, used for SSH connection reuse.'
)