diff --git a/package.json b/package.json index 29d99f0..e3d66ae 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,10 @@ }, { "name": "Sebastián Balay" + }, + { + "name": "Gabriel Fürstenheim", + "url": "https://github.com/furstenheim" } ], "license": "MIT", diff --git a/readme.md b/readme.md index f538387..ab7cbf5 100644 --- a/readme.md +++ b/readme.md @@ -71,6 +71,7 @@ compose.exec('node', 'npm install', { cwd: path.join(__dirname) }) * `cwd {string}`: mandatory folder path to the `docker-compose.yml` * `config {(string|string[])}`: custom and/or multiple yml files can be specified (relative to `cwd`) +* `configAsString {string}`: configuration can be provided as is, instead of relying on a file. In case `configAsString` is provided `config` will be ignored. * `[log] {boolean}`: optional setting to enable console logging (output of `docker-compose` `stdout`/`stderr` output) * `[composeOptions] string[]|Array => { - const configuration = await new Promise(function (resolve, reject) { + const configuration = await new Promise(function (resolve, reject) { readFile(path.join(__dirname, 'docker-compose-2.yml'), function (err, content) { if (err) { - return reject(err); + reject(err); + return; } - return resolve(content.toString()); + resolve(content.toString()); }) }); const config = { - configAsString: configuration, - log: logOutput + configAsString: configuration, + log: logOutput, }; await compose.upAll(config);