예제 #1
0
    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>.")
)


ORCHESTRA_SITE_URL = Setting('ORCHESTRA_SITE_URL',
    'https://orchestra.%s' % ORCHESTRA_BASE_DOMAIN,
    help_text=_("Domain name used when it will not be possible to infere the domain from a request."
                "For example in periodic tasks.<br>"
                "Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.")
)


ORCHESTRA_SITE_NAME = Setting('ORCHESTRA_SITE_NAME',
    'orchestra',
)


ORCHESTRA_SITE_VERBOSE_NAME = Setting('ORCHESTRA_SITE_VERBOSE_NAME',
    "%s Hosting Management" % ORCHESTRA_SITE_NAME.capitalize(),
    help_text="Uses <tt>ORCHESTRA_SITE_NAME</tt> by default."
)


# Service management commands

ORCHESTRA_START_SERVICES = Setting('ORCHESTRA_START_SERVICES',
    default=(
        'postgresql',
#        'celeryevcam',
예제 #2
0
from orchestra.contrib.settings import Setting
from orchestra.settings import ORCHESTRA_BASE_DOMAIN

from .. import webapps


_names = ("home", "user", "group", "app_type", "app_name", "app_type", "app_id")
_php_names = _names + ("php_version", "php_version_number")
_python_names = _names + ("python_version", "python_version_number")


WEBAPPS_BASE_DIR = Setting(
    "WEBAPPS_BASE_DIR",
    "%(home)s/webapps/%(app_name)s",
    help_text="Available fromat names: <tt>%s</tt>" % ", ".join(_names),
    validators=[Setting.string_format_validator(_names)],
)


WEBAPPS_FPM_LISTEN = Setting(
    "WEBAPPS_FPM_LISTEN",
    "/opt/php/5.4/socks/%(user)s-%(app_name)s.sock",
    help_text=("TCP socket example: <tt>127.0.0.1:9%(app_id)03d</tt><br>" "Available fromat names: <tt>{}</tt>").format(
        ", ".join(_php_names)
    ),
    validators=[Setting.string_format_validator(_php_names)],
)


WEBAPPS_FPM_DEFAULT_MAX_CHILDREN = Setting("WEBAPPS_FPM_DEFAULT_MAX_CHILDREN", 3)
예제 #3
0

_names = ('name', 'username',)
_backend_names = _names + ('user', 'group', 'home')
mark_safe_lazy = lazy(mark_safe, str)


MAILBOXES_DOMAIN_MODEL = Setting('MAILBOXES_DOMAIN_MODEL', 'domains.Domain',
    validators=[Setting.validate_model_label]
)


MAILBOXES_HOME = Setting('MAILBOXES_HOME',
    '/home/%(name)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


MAILBOXES_SIEVE_PATH = Setting('MAILBOXES_SIEVE_PATH',
    os.path.join('%(home)s/sieve/orchestra.sieve'),
    help_text="If you are using Dovecot you can use "
        "<a href='http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration#line-130'>"
        "<tt>sieve_before</tt></a> in order to make sure orchestra sieve script is exectued."
        "<br>Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_backend_names)],
)


MAILBOXES_SIEVETEST_PATH = Setting('MAILBOXES_SIEVETEST_PATH',
    '/dev/shm'
예제 #4
0
from django.utils.translation import ugettext_lazy as _

from orchestra.contrib.settings import Setting
from orchestra.core.validators import validate_ip_address

from .. import websites


_names = ('id', 'pk', 'home', 'user', 'group', 'site_name', 'protocol')
_log_names = _names + ('unique_name',)


WEBSITES_UNIQUE_NAME_FORMAT = Setting('WEBSITES_UNIQUE_NAME_FORMAT',
    default='%(user)s-%(site_name)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


WEBSITES_PROTOCOL_CHOICES = Setting('WEBSITES_PROTOCOL_CHOICES',
    default=(
        ('http', "HTTP"),
        ('https', "HTTPS"),
        ('http/https', _("HTTP and HTTPS")),
        ('https-only', _("HTTPS only")),
    ),
    validators=[Setting.validate_choices]
)


WEBSITES_DEFAULT_PROTOCOL = Setting('WEBSITES_DEFAULT_PROTOCOL',
예제 #5
0
    choices=SYSTEMUSERS_SHELLS
)


SYSTEMUSERS_DISABLED_SHELLS = Setting('SYSTEMUSERS_DISABLED_SHELLS',
    default=(
        '/dev/null',
        '/bin/rssh',
    ),
)


SYSTEMUSERS_HOME = Setting('SYSTEMUSERS_HOME',
    '/home/%(user)s',
    help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
    validators=[Setting.string_format_validator(_names)],
)


SYSTEMUSERS_FTP_LOG_PATH = Setting('SYSTEMUSERS_FTP_LOG_PATH',
    '/var/log/vsftpd.log'
)


SYSTEMUSERS_MAIL_LOG_PATH = Setting('SYSTEMUSERS_MAIL_LOG_PATH',
    '/var/log/exim4/mainlog'
)

SYSTEMUSERS_DEFAULT_GROUP_MEMBERS = Setting('SYSTEMUSERS_DEFAULT_GROUP_MEMBERS',
    ('www-data',)
)
예제 #6
0
from orchestra.core.validators import validate_hostname

from orchestra.contrib.settings import Setting


DATABASES_TYPE_CHOICES = Setting('DATABASES_TYPE_CHOICES',
    (
        ('mysql', 'MySQL'),
        ('postgres', 'PostgreSQL'),
    ),
    validators=[Setting.validate_choices]
)


DATABASES_DEFAULT_TYPE = Setting('DATABASES_DEFAULT_TYPE',
    'mysql',
    choices=DATABASES_TYPE_CHOICES,
)


DATABASES_DEFAULT_HOST = Setting('DATABASES_DEFAULT_HOST',
    'localhost',
#    validators=[validate_hostname],
)


DATABASES_MYSQL_DB_DIR = Setting('DATABASES_MYSQL_DB_DIR',
    '/var/lib/mysql',
)