mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-26 21:41:45 +00:00
chore: include description of configAsString in the readme
This commit is contained in:
parent
e8c14d318c
commit
f1c2c7e8c1
3 changed files with 11 additions and 5 deletions
|
|
@ -66,6 +66,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Sebastián Balay"
|
"name": "Sebastián Balay"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gabriel Fürstenheim",
|
||||||
|
"url": "https://github.com/furstenheim"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ compose.exec('node', 'npm install', { cwd: path.join(__dirname) })
|
||||||
|
|
||||||
* `cwd {string}`: mandatory folder path to the `docker-compose.yml`
|
* `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`)
|
* `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)
|
* `[log] {boolean}`: optional setting to enable console logging (output of `docker-compose` `stdout`/`stderr` output)
|
||||||
* `[composeOptions] string[]|Array<string|string[]`: pass optional compose options like `"--verbose"` or `[["--verbose"], ["--log-level", "DEBUG"]]` or `["--verbose", ["--loglevel", "DEBUG"]]` for *all* commands.
|
* `[composeOptions] string[]|Array<string|string[]`: pass optional compose options like `"--verbose"` or `[["--verbose"], ["--log-level", "DEBUG"]]` or `["--verbose", ["--loglevel", "DEBUG"]]` for *all* commands.
|
||||||
* `[commandOptions] string[]|Array<string|string[]`: pass optional command options like `"--build"` or `[["--build"], ["--timeout", "5"]]` or `["--build", ["--timeout", "5"]]` for the `up` command. Viable `commandOptions` depend on the command (`up`, `down` etc.) itself
|
* `[commandOptions] string[]|Array<string|string[]`: pass optional command options like `"--build"` or `[["--build"], ["--timeout", "5"]]` or `["--build", ["--timeout", "5"]]` for the `up` command. Viable `commandOptions` depend on the command (`up`, `down` etc.) itself
|
||||||
|
|
|
||||||
|
|
@ -303,17 +303,18 @@ test('ensure run and exec with command defined as array are working', async ():
|
||||||
});
|
});
|
||||||
|
|
||||||
test('build accepts config as string', async (): Promise<void> => {
|
test('build accepts config as string', async (): Promise<void> => {
|
||||||
const configuration = await new Promise(function (resolve, reject) {
|
const configuration = await new Promise<string>(function (resolve, reject) {
|
||||||
readFile(path.join(__dirname, 'docker-compose-2.yml'), function (err, content) {
|
readFile(path.join(__dirname, 'docker-compose-2.yml'), function (err, content) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return reject(err);
|
reject(err);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return resolve(content.toString());
|
resolve(content.toString());
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
const config = {
|
const config = {
|
||||||
configAsString: <string> configuration,
|
configAsString: configuration,
|
||||||
log: logOutput
|
log: logOutput,
|
||||||
};
|
};
|
||||||
|
|
||||||
await compose.upAll(config);
|
await compose.upAll(config);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue