2015-07-20 00:09:47 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
2019-07-25 14:40:52 -07:00
|
|
|
let fs = require('fs'),
|
|
|
|
|
path = require('path');
|
|
|
|
|
|
2019-07-25 15:43:51 -07:00
|
|
|
const CLOUDRON = process.env.BOX_ENV === 'cloudron',
|
|
|
|
|
TEST = process.env.BOX_ENV === 'test';
|
|
|
|
|
|
2015-07-20 00:09:47 -07:00
|
|
|
exports = module.exports = {
|
2016-05-04 15:35:59 -07:00
|
|
|
SMTP_LOCATION: 'smtp',
|
|
|
|
|
IMAP_LOCATION: 'imap',
|
|
|
|
|
|
2016-09-26 22:17:35 -07:00
|
|
|
// These are combined into one array because users and groups become mailboxes
|
|
|
|
|
RESERVED_NAMES: [
|
|
|
|
|
// Reserved usernames
|
|
|
|
|
// https://github.com/gogits/gogs/blob/52c8f691630548fe091d30bcfe8164545a05d3d5/models/repo.go#L393
|
2018-01-19 22:10:10 -08:00
|
|
|
// apps like wordpress, gogs don't like these
|
|
|
|
|
// postmaster is used in dovecot and haraka
|
|
|
|
|
'admin', 'no-reply', 'postmaster', 'mailer-daemon',
|
2016-09-26 22:17:35 -07:00
|
|
|
|
|
|
|
|
// Reserved groups
|
|
|
|
|
'admins', 'users' // ldap code uses 'users' pseudo group
|
|
|
|
|
],
|
|
|
|
|
|
2018-12-13 21:42:47 -08:00
|
|
|
ADMIN_LOCATION: 'my',
|
2015-07-20 00:09:47 -07:00
|
|
|
|
2019-07-25 15:43:51 -07:00
|
|
|
PORT: CLOUDRON ? 3000 : 5454,
|
2019-07-25 15:27:28 -07:00
|
|
|
INTERNAL_SMTP_PORT: 2525, // this value comes from the mail container
|
2019-09-12 13:32:58 -07:00
|
|
|
SYSADMIN_PORT: 3001, // unused
|
2019-07-25 15:33:34 -07:00
|
|
|
LDAP_PORT: 3002,
|
|
|
|
|
DOCKER_PROXY_PORT: 3003,
|
2019-07-25 15:21:15 -07:00
|
|
|
|
2018-11-10 22:02:42 -08:00
|
|
|
NGINX_DEFAULT_CONFIG_FILE_NAME: 'default.conf',
|
2017-01-06 14:19:38 +01:00
|
|
|
|
2020-03-23 21:51:11 -07:00
|
|
|
DEFAULT_TOKEN_EXPIRATION: 365 * 24 * 60 * 60 * 1000, // 1 year
|
2016-08-01 10:14:45 +02:00
|
|
|
|
2016-08-31 21:00:05 -07:00
|
|
|
DEFAULT_MEMORY_LIMIT: (256 * 1024 * 1024), // see also client.js
|
|
|
|
|
|
2016-12-14 14:54:17 +01:00
|
|
|
DEMO_USERNAME: 'cloudron',
|
|
|
|
|
|
2019-02-15 10:55:15 -08:00
|
|
|
AUTOUPDATE_PATTERN_NEVER: 'never',
|
|
|
|
|
|
2019-07-25 14:40:52 -07:00
|
|
|
SECRET_PLACEHOLDER: String.fromCharCode(0x25CF).repeat(8),
|
|
|
|
|
|
2019-07-25 15:43:51 -07:00
|
|
|
CLOUDRON: CLOUDRON,
|
|
|
|
|
TEST: TEST,
|
2019-07-25 14:40:52 -07:00
|
|
|
|
2020-02-04 13:07:26 -08:00
|
|
|
SUPPORT_EMAIL: 'support@cloudron.io',
|
|
|
|
|
|
2020-03-06 19:13:37 -08:00
|
|
|
FOOTER: '© 2020 [Cloudron](https://cloudron.io) [Forum <i class="fa fa-comments"></i>](https://forum.cloudron.io)',
|
2020-03-06 18:08:26 -08:00
|
|
|
|
2020-04-08 14:02:46 -07:00
|
|
|
VERSION: process.env.BOX_ENV === 'cloudron' ? fs.readFileSync(path.join(__dirname, '../VERSION'), 'utf8').trim() : '5.1.1-test'
|
2015-07-20 00:09:47 -07:00
|
|
|
};
|
|
|
|
|
|