thunderhub/next.config.js

55 lines
1.8 KiB
JavaScript
Raw Normal View History

const ymlEnv = {
YML_ENV_1: process.env.YML_ENV_1 || '',
YML_ENV_2: process.env.YML_ENV_2 || '',
YML_ENV_3: process.env.YML_ENV_3 || '',
YML_ENV_4: process.env.YML_ENV_4 || '',
};
const ssoEnv = {
cookiePath: process.env.COOKIE_PATH || '',
lnServerUrl: process.env.SSO_SERVER_URL || '',
lnCertPath: process.env.SSO_CERT_PATH || '',
macaroonPath: process.env.SSO_MACAROON_PATH || '',
dangerousNoSSOAuth:
process.env.DANGEROUS_NO_SSO_AUTH === 'true' ? true : false,
};
const sslEnv = {
publicUrl: process.env.PUBLIC_URL || '',
sslPort: process.env.SSL_PORT || '',
sslSave: process.env.SSL_SAVE || '',
};
const accountConfig = {
accountConfigPath: process.env.ACCOUNT_CONFIG_PATH || '',
};
2021-07-04 19:05:02 +02:00
module.exports = {
2020-04-14 08:25:58 +02:00
poweredByHeader: false,
2020-12-16 13:52:59 +01:00
basePath: process.env.BASE_PATH || '',
2020-04-14 08:25:58 +02:00
serverRuntimeConfig: {
nodeEnv: process.env.NODE_ENV || 'development',
logLevel: process.env.LOG_LEVEL || 'info',
torProxy: process.env.TOR_PROXY_SERVER || '',
...ssoEnv,
...accountConfig,
...sslEnv,
...ymlEnv,
2020-04-14 08:25:58 +02:00
},
publicRuntimeConfig: {
nodeEnv: process.env.NODE_ENV || 'development',
2020-04-14 23:02:33 +02:00
apiUrl: `${process.env.BASE_PATH || ''}/api/v1`,
apiBaseUrl: `${process.env.API_BASE_URL || ''}/api/v1`,
basePath: process.env.BASE_PATH || '',
2020-04-14 08:25:58 +02:00
npmVersion: process.env.npm_package_version || '0.0.0',
defaultTheme: process.env.THEME || 'dark',
defaultCurrency: process.env.CURRENCY || 'sat',
2020-05-31 12:56:02 +02:00
fetchPrices: process.env.FETCH_PRICES === 'false' ? false : true,
fetchFees: process.env.FETCH_FEES === 'false' ? false : true,
2020-06-09 21:43:04 +02:00
disableLinks: process.env.DISABLE_LINKS === 'true' ? true : false,
2020-10-10 19:56:48 +02:00
disableLnMarkets: process.env.DISABLE_LNMARKETS === 'true' ? true : false,
2020-06-09 21:43:04 +02:00
noVersionCheck: process.env.NO_VERSION_CHECK === 'true' ? true : false,
2020-12-15 22:45:57 +01:00
logoutUrl: process.env.LOGOUT_URL || '',
2020-04-14 08:25:58 +02:00
},
2021-07-04 19:05:02 +02:00
};