From 3ae3cb191d15ddb83817bbfd279aba0edd3813dc Mon Sep 17 00:00:00 2001 From: BoHong Li Date: Fri, 6 Mar 2020 20:51:25 +0800 Subject: [PATCH] fix: some environment variables not in docker secret Signed-off-by: BoHong Li --- lib/config/dockerSecret.js | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/lib/config/dockerSecret.js b/lib/config/dockerSecret.js index fd66ddfe..bbac9722 100644 --- a/lib/config/dockerSecret.js +++ b/lib/config/dockerSecret.js @@ -13,18 +13,32 @@ function getSecret (secret) { if (fs.existsSync(basePath)) { module.exports = { - sessionsecret: getSecret('sessionsecret'), - sslkeypath: getSecret('sslkeypath'), - sslcertpath: getSecret('sslcertpath'), - sslcapath: getSecret('sslcapath'), - dhparampath: getSecret('dhparampath'), + dbURL: getSecret('dburl'), + // ssl path + sslKeyPath: getSecret('sslkeypath'), + sslCertPath: getSecret('sslcertpath'), + sslCAPath: getSecret('sslcapath'), + dhParamPath: getSecret('dhparampath'), + // session + sessionSecret: getSecret('sessionsecret'), + imgur: { + clientID: getSecret('imgur_clientid') + }, s3: { accessKeyId: getSecret('s3_acccessKeyId'), secretAccessKey: getSecret('s3_secretAccessKey') }, + minio: { + accessKey: getSecret('minio_accessKey'), + secretKey: getSecret('minio_secretKey') + }, azure: { connectionString: getSecret('azure_connectionString') }, + oauth2: { + clientID: getSecret('oauth2_clientID'), + clientSecret: getSecret('oauth2_clientSecret') + }, facebook: { clientID: getSecret('facebook_clientID'), clientSecret: getSecret('facebook_clientSecret') @@ -54,6 +68,12 @@ if (fs.existsSync(basePath)) { clientID: getSecret('google_clientID'), clientSecret: getSecret('google_clientSecret') }, - imgur: getSecret('imgur_clientid') + ldap: { + bindCredentials: getSecret('ldap_bindCredentials'), + tlsca: getSecret('ldap_tlsca') + }, + saml: { + idpCert: getSecret('saml_idpCert') + } } }