2015-07-20 12:51:30 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2015-05-04 19:52:53 +00:00
|
|
|
from orchestra.contrib.settings import Setting
|
2015-09-20 12:28:22 +00:00
|
|
|
from orchestra.core.validators import validate_ip_address
|
2015-05-04 19:52:53 +00:00
|
|
|
from orchestra.settings import ORCHESTRA_BASE_DOMAIN
|
2015-04-26 13:53:00 +00:00
|
|
|
|
|
|
|
from .. import saas
|
|
|
|
|
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
SAAS_ENABLED_SERVICES = Setting('SAAS_ENABLED_SERVICES',
|
|
|
|
(
|
2015-04-26 13:53:00 +00:00
|
|
|
'orchestra.contrib.saas.services.moodle.MoodleService',
|
|
|
|
'orchestra.contrib.saas.services.bscw.BSCWService',
|
|
|
|
'orchestra.contrib.saas.services.gitlab.GitLabService',
|
|
|
|
'orchestra.contrib.saas.services.phplist.PHPListService',
|
|
|
|
'orchestra.contrib.saas.services.wordpress.WordPressService',
|
|
|
|
'orchestra.contrib.saas.services.dokuwiki.DokuWikiService',
|
|
|
|
'orchestra.contrib.saas.services.drupal.DrupalService',
|
|
|
|
'orchestra.contrib.saas.services.seafile.SeaFileService',
|
|
|
|
),
|
|
|
|
# lazy loading
|
2015-04-26 15:52:40 +00:00
|
|
|
choices=lambda: ((s.get_class_path(), s.get_class_path()) for s in saas.services.SoftwareService.get_plugins()),
|
2015-04-26 13:53:00 +00:00
|
|
|
multiple=True,
|
|
|
|
)
|
2015-03-23 15:36:51 +00:00
|
|
|
|
|
|
|
|
2015-09-16 12:15:05 +00:00
|
|
|
SAAS_TRAFFIC_IGNORE_HOSTS = Setting('SAAS_TRAFFIC_IGNORE_HOSTS',
|
2015-09-20 12:28:22 +00:00
|
|
|
('127.0.0.1',),
|
2015-09-17 11:21:35 +00:00
|
|
|
help_text=_("IP addresses to ignore during traffic accountability."),
|
2015-09-20 12:28:22 +00:00
|
|
|
validators=[lambda hosts: (validate_ip_address(host) for host in hosts)]
|
2015-09-16 12:15:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# WordPress
|
|
|
|
|
2015-09-16 12:15:05 +00:00
|
|
|
SAAS_WORDPRESS_LOG_PATH = Setting('SAAS_WORDPRESS_LOG_PATH',
|
|
|
|
'',
|
2015-09-17 11:21:35 +00:00
|
|
|
help_text=_('Filesystem path for the webserver access logs.<br>'
|
|
|
|
'<tt>LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Host}i\"" host</tt>'),
|
2015-09-16 12:15:05 +00:00
|
|
|
)
|
|
|
|
|
2015-09-10 10:34:07 +00:00
|
|
|
SAAS_WORDPRESS_ADMIN_PASSWORD = Setting('SAAS_WORDPRESS_ADMIN_PASSWORD',
|
2015-04-27 14:54:17 +00:00
|
|
|
'secret'
|
|
|
|
)
|
2015-03-23 15:36:51 +00:00
|
|
|
|
2015-09-29 12:35:22 +00:00
|
|
|
SAAS_WORDPRESS_MAIN_URL = Setting('SAAS_WORDPRESS_MAIN_URL',
|
2015-04-27 14:54:17 +00:00
|
|
|
'https://blogs.{}/'.format(ORCHESTRA_BASE_DOMAIN),
|
|
|
|
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.",
|
2015-03-23 15:36:51 +00:00
|
|
|
)
|
|
|
|
|
2015-09-29 12:35:22 +00:00
|
|
|
SAAS_WORDPRESS_DOMAIN = Setting('SAAS_WORDPRESS_DOMAIN',
|
|
|
|
'%(site_name)s.blogs.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
2015-06-09 11:16:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# DokuWiki
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_DOKUWIKI_TEMPLATE_PATH = Setting('SAAS_DOKUWIKI_TEMPLATE_PATH',
|
2015-03-31 12:39:08 +00:00
|
|
|
'/home/httpd/htdocs/wikifarm/template.tar.gz'
|
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_DOKUWIKI_FARM_PATH = Setting('WEBSITES_DOKUWIKI_FARM_PATH',
|
2015-03-23 15:36:51 +00:00
|
|
|
'/home/httpd/htdocs/wikifarm/farm'
|
|
|
|
)
|
|
|
|
|
2015-09-29 12:35:22 +00:00
|
|
|
SAAS_DOKUWIKI_DOMAIN = Setting('SAAS_DOKUWIKI_DOMAIN',
|
|
|
|
'%(site_name)s.dokuwiki.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
2015-06-09 11:16:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_DOKUWIKI_TEMPLATE_PATH = Setting('SAAS_DOKUWIKI_TEMPLATE_PATH',
|
|
|
|
'/var/www/wikifarm/template.tar.gz',
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_DOKUWIKI_FARM_PATH = Setting('SAAS_DOKUWIKI_FARM_PATH',
|
|
|
|
'/var/www/wikifarm/farm'
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_DOKUWIKI_USER = Setting('SAAS_DOKUWIKI_USER',
|
|
|
|
'orchestra'
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_DOKUWIKI_GROUP = Setting('SAAS_DOKUWIKI_GROUP',
|
|
|
|
'orchestra'
|
|
|
|
)
|
|
|
|
|
2015-09-17 11:21:35 +00:00
|
|
|
SAAS_DOKUWIKI_LOG_PATH = Setting('SAAS_DOKUWIKI_LOG_PATH',
|
|
|
|
'',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# Drupal
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_DRUPAL_SITES_PATH = Setting('WEBSITES_DRUPAL_SITES_PATH',
|
2015-04-27 14:54:17 +00:00
|
|
|
'/home/httpd/htdocs/drupal-mu/sites/%(site_name)s',
|
2015-03-23 15:36:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# PhpList
|
|
|
|
|
2015-07-20 12:51:30 +00:00
|
|
|
SAAS_PHPLIST_DB_USER = Setting('SAAS_PHPLIST_DB_USER',
|
2015-04-27 14:54:17 +00:00
|
|
|
'phplist_mu',
|
2015-07-20 12:51:30 +00:00
|
|
|
help_text=_("Needed for password changing support."),
|
2015-03-23 15:36:51 +00:00
|
|
|
)
|
|
|
|
|
2015-07-20 12:51:30 +00:00
|
|
|
SAAS_PHPLIST_DB_PASS = Setting('SAAS_PHPLIST_DB_PASS',
|
|
|
|
'secret',
|
|
|
|
help_text=_("Needed for password changing support."),
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_PHPLIST_DB_NAME = Setting('SAAS_PHPLIST_DB_NAME',
|
|
|
|
'phplist_mu_%(site_name)s',
|
|
|
|
help_text=_("Needed for password changing support."),
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_PHPLIST_DB_HOST = Setting('SAAS_PHPLIST_DB_HOST',
|
|
|
|
'loclahost',
|
|
|
|
help_text=_("Needed for password changing support."),
|
|
|
|
)
|
|
|
|
|
2015-09-22 10:24:04 +00:00
|
|
|
SAAS_PHPLIST_BOUNCES_MAILBOX_NAME = Setting('SAAS_PHPLIST_BOUNCES_MAILBOX_NAME',
|
|
|
|
'%(site_name)s-list-bounces',
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_PHPLIST_BOUNCES_MAILBOX_PASSWORD = Setting('SAAS_PHPLIST_BOUNCES_MAILBOX_PASSWORD',
|
|
|
|
'secret',
|
|
|
|
)
|
2015-07-20 12:51:30 +00:00
|
|
|
|
2015-09-29 12:35:22 +00:00
|
|
|
SAAS_PHPLIST_DOMAIN = Setting('SAAS_PHPLIST_DOMAIN',
|
|
|
|
'%(site_name)s.lists.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
2015-04-27 14:54:17 +00:00
|
|
|
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.",
|
2015-03-23 15:36:51 +00:00
|
|
|
)
|
|
|
|
|
2015-07-09 13:04:26 +00:00
|
|
|
SAAS_PHPLIST_VERIFY_SSL = Setting('SAAS_PHPLIST_VERIFY_SSL',
|
|
|
|
True,
|
2015-08-04 10:50:05 +00:00
|
|
|
help_text=_("Verify SSL certificate on the HTTP requests performed by the backend."),
|
2015-07-09 13:04:26 +00:00
|
|
|
)
|
|
|
|
|
2015-08-04 10:50:05 +00:00
|
|
|
SAAS_PHPLIST_PATH = Setting('SAAS_PHPLIST_PATH',
|
|
|
|
'/var/www/phplist-mu',
|
|
|
|
help_text=_("Filesystem path to the phpList source code installed on the server. "
|
|
|
|
"Used by <tt>SAAS_PHPLIST_CRONTAB</tt>.")
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_PHPLIST_SYSTEMUSER = Setting('SAAS_PHPLIST_SYSTEMUSER',
|
|
|
|
'root',
|
|
|
|
help_text=_("System user running phpList on the server."
|
|
|
|
"Used by <tt>SAAS_PHPLIST_CRONTAB</tt>.")
|
|
|
|
)
|
|
|
|
|
|
|
|
SAAS_PHPLIST_CRONTAB = Setting('SAAS_PHPLIST_CRONTAB',
|
|
|
|
('*/10 * * * * PHPLIST=%(phplist_path)s; export SITE="%(site_name)s"; php $PHPLIST/admin/index.php -c $PHPLIST/config/config.php -p processqueue > /dev/null\n'
|
|
|
|
'*/40 * * * * PHPLIST=%(phplist_path)s; export SITE="%(site_name)s"; php $PHPLIST/admin/index.php -c $PHPLIST/config/config.php -p processbounces > /dev/null'),
|
|
|
|
help_text=_("<tt>processqueue</tt> and <tt>processbounce</tt> phpList cron execution. "
|
|
|
|
"Left blank if you don't want crontab to be configured")
|
|
|
|
)
|
2015-07-09 13:04:26 +00:00
|
|
|
|
2015-09-16 12:15:05 +00:00
|
|
|
SAAS_PHPLIST_MAIL_LOG_PATH = Setting('SAAS_PHPLIST_MAIL_LOG_PATH',
|
|
|
|
'/var/log/mail.log',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# SeaFile
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_SEAFILE_DOMAIN = Setting('SAAS_SEAFILE_DOMAIN',
|
2015-04-27 14:54:17 +00:00
|
|
|
'seafile.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
|
|
|
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.",
|
2015-03-26 16:00:30 +00:00
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_SEAFILE_DEFAULT_QUOTA = Setting('SAAS_SEAFILE_DEFAULT_QUOTA',
|
2015-03-26 16:00:30 +00:00
|
|
|
50
|
|
|
|
)
|
|
|
|
|
2015-03-31 12:39:08 +00:00
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# BSCW
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_BSCW_DOMAIN = Setting('SAAS_BSCW_DOMAIN',
|
2015-04-27 14:54:17 +00:00
|
|
|
'bscw.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
|
|
|
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.",
|
2015-03-23 15:36:51 +00:00
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_BSCW_DEFAULT_QUOTA = Setting('SAAS_BSCW_DEFAULT_QUOTA',
|
2015-04-27 14:54:17 +00:00
|
|
|
50,
|
2015-03-25 15:45:04 +00:00
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_BSCW_BSADMIN_PATH = Setting('SAAS_BSCW_BSADMIN_PATH',
|
2015-03-31 12:39:08 +00:00
|
|
|
'/home/httpd/bscw/bin/bsadmin',
|
|
|
|
)
|
2015-03-25 15:45:04 +00:00
|
|
|
|
2015-03-26 16:00:30 +00:00
|
|
|
|
2015-09-20 12:28:22 +00:00
|
|
|
# GitLab
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_GITLAB_ROOT_PASSWORD = Setting('SAAS_GITLAB_ROOT_PASSWORD',
|
2015-04-27 14:54:17 +00:00
|
|
|
'secret',
|
2015-03-25 15:45:04 +00:00
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SAAS_GITLAB_DOMAIN = Setting('SAAS_GITLAB_DOMAIN',
|
2015-04-27 14:54:17 +00:00
|
|
|
'gitlab.{}'.format(ORCHESTRA_BASE_DOMAIN),
|
|
|
|
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.",
|
2015-03-25 15:45:04 +00:00
|
|
|
)
|