mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
const config = {
|
|
/**
|
|
* Set these configs below to suite your environment.
|
|
*/
|
|
domain: process.env.DOMAIN || '127.0.0.1', // Or for example 'wikiless.org'
|
|
default_lang: process.env.DEFAULT_LANG || 'en',
|
|
theme: process.env.THEME || '', // '' or 'dark'
|
|
nonssl_port: process.env.NONSSL_PORT || 8080,
|
|
|
|
/**
|
|
* If your environment is using HTTPS, set these configs below.
|
|
*/
|
|
https_enabled: process.env.HTTPS_ENABLED === 'true' || false,
|
|
ssl_port: process.env.SSL_PORT || 8088,
|
|
cert_dir: process.env.CERT_DIR || ``, // For example '/home/wikiless/letsencrypt/live/wikiless.org'. No trailing slash.
|
|
redirect_http_to_https: process.env.REDIRECT_HTTP_TO_HTTPS === 'true' || false, // If true, HTTP requests will be redirected to HTTPS
|
|
|
|
/**
|
|
* You can configure redis below if needed.
|
|
*/
|
|
redis_db: process.env.REDIS_DB,
|
|
redis_host: process.env.REDIS_HOST || '127.0.0.1',
|
|
redis_password: process.env.REDIS_PASSWORD,
|
|
redis_port: process.env.REDIS_PORT || 6379,
|
|
|
|
/**
|
|
* You might need to change these configs below if you host through reverse
|
|
* proxy like nginx.
|
|
*/
|
|
trust_proxy: process.env.TRUST_PROXY === 'true' || false,
|
|
trust_proxy_address: process.env.TRUST_PROXY_ADDRESS || '127.0.0.1',
|
|
|
|
/**
|
|
* Redis cache expiration values (in seconds).
|
|
* When the cache expires, new content is fetched from Wikipedia (when the
|
|
* given URL is revisited).
|
|
*/
|
|
setexs: {
|
|
wikipage: 60 * 60 * 1, // 1 hour
|
|
},
|
|
}
|
|
|
|
module.exports = config
|