diff --git a/config/index.js b/config/index.js index d8cdedf6e..60fa27930 100644 --- a/config/index.js +++ b/config/index.js @@ -105,10 +105,12 @@ const initGlobalConfig = () => { defaultConfig = require(path.join(process.cwd(), './config', 'defaults', 'development')); } // Get the config from process.env.WAOS_NODE_* - const environmentVars = _.mapKeys( + let environmentVars = _.mapKeys( _.pickBy(process.env, (_value, key) => key.startsWith('WAOS_NODE_')), (_v, k) => k.split('_').slice(2).join('.'), ); + // convert string array from sys to real array + environmentVars = _.mapValues(environmentVars, v => ((v[0] === '[' && v[v.length - 1] === ']') ? v.replace(/'/g, '').slice(1, -1).split(',') : v)); const environmentConfigVars = {}; _.forEach(environmentVars, (v, k) => objectPath.set(environmentConfigVars, k, v)); // Merge config files diff --git a/scripts/deploy-travis.sh b/scripts/deploy-travis.sh index c122af0d3..2cd178c09 100755 --- a/scripts/deploy-travis.sh +++ b/scripts/deploy-travis.sh @@ -17,7 +17,7 @@ ssh -p $sshPort $sshUser@$sshHost -o StrictHostKeyChecking=no "$( cat <> ./deploy.log exit EOT