|
|
|
@ -10,6 +10,10 @@ const port = process.env.PORT ? Number(process.env.PORT) : 11000;
|
|
|
|
|
const apiUrl = process.env.API_URL || `http://127.0.0.1:${port}`;
|
|
|
|
|
const staticHost = process.env.STATIC_HOST || '{BACKEND}';
|
|
|
|
|
const staticUrl = process.env.STATIC_URL || `${staticHost}/static/`;
|
|
|
|
|
const requestTimeout = process.env.REQUEST_TIMEOUT
|
|
|
|
|
? Number(process.env.REQUEST_TIMEOUT)
|
|
|
|
|
: 10 * 1000; // default 0 (unit: milliseconds)
|
|
|
|
|
|
|
|
|
|
export const config = {
|
|
|
|
|
port,
|
|
|
|
|
secret: process.env.SECRET || 'tailchat',
|
|
|
|
@ -47,6 +51,9 @@ export const config = {
|
|
|
|
|
connectionUrl: process.env.SMTP_URI || '',
|
|
|
|
|
},
|
|
|
|
|
enablePrometheus: checkEnvTrusty(process.env.PROMETHEUS),
|
|
|
|
|
runner: {
|
|
|
|
|
requestTimeout,
|
|
|
|
|
},
|
|
|
|
|
feature: {
|
|
|
|
|
disableFileCheck: checkEnvTrusty(process.env.DISABLE_FILE_CHECK),
|
|
|
|
|
disableLogger: checkEnvTrusty(process.env.DISABLE_LOGGER), // 是否关闭日志
|
|
|
|
|