根据 inDev 来设置dev和prod的不同环境变量值

This commit is contained in:
Luk Lu
2022-06-05 09:34:43 +08:00
parent 35708af141
commit 5e64af7b2d

View File

@@ -1,17 +1,12 @@
module.exports={ const inDev = global.inDev || global.envar?.inDev || process.env.NODE_ENV === 'development'
protocol: 'http',
host: 'localhost', module.exports = {
protocol: inDev ? 'http' : 'httpall',
host: inDev ? 'localhost' : 'vic-user.bittic.org',
port: undefined, port: undefined,
sslType: 'file', // greenlock or file
ENV_PRODUCTION: { sslDomainList: ['vic-user.bittic.org'],
protocol: 'httpall', sslKey: '/etc/letsencrypt/live/vic-server.bittic.org/privkey.pem', // ssl key file,
host: 'vic-user.bittic.org', sslCert: '/etc/letsencrypt/live/vic-server.bittic.org/fullchain.pem', // ssl cert file,
// 如果使用 https 协议,必须填写以下内容,或在命令行参数中设置: sslCA: '/etc/letsencrypt/live/vic-server.bittic.org/bundle.pem', // ssl ca file,
sslType: 'file', // greenlock or file }
sslDomainList: ['vic-user.bittic.org'],
sslKey: '/etc/letsencrypt/live/vic-server.bittic.org/privkey.pem', // ssl key file,
sslCert: '/etc/letsencrypt/live/vic-server.bittic.org/fullchain.pem', // ssl cert file,
sslCA: '/etc/letsencrypt/live/vic-server.bittic.org/bundle.pem', // ssl ca file,
},
}