diff --git a/README.md b/README.md index 7e1ca24..1753abe 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ dockerCompose { pullAdditionalArgs = ['--ignore-pull-failures'] upAdditionalArgs = ['--no-deps'] downAdditionalArgs = ['--some-switch'] + composeAdditionalArgs = ['--context', 'remote', '--verbose', "--log-level, "DEBUG"] // for adding more [options] in docker-compose [-f ...] [options] [COMMAND] [ARGS...] waitForTcpPorts = true // turns on/off the waiting for exposed TCP ports opening; default is true waitForTcpPortsTimeout = Duration.ofMinutes(15) // how long to wait until all exposed TCP become open; default is 15 minutes diff --git a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy index 24080af..9f3abfa 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy @@ -36,6 +36,7 @@ class ComposeExecutor { } e.environment = ex.environment def finalArgs = [ex.executable] + finalArgs.addAll(ex.composeAdditionalArgs) if (noAnsi && version >= VersionNumber.parse("1.16.0")) { finalArgs.add('--no-ansi') } diff --git a/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy b/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy index b346f4d..a7dae1a 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/ComposeSettings.groovy @@ -63,6 +63,7 @@ class ComposeSettings { List pullAdditionalArgs = [] List upAdditionalArgs = [] List downAdditionalArgs = [] + List composeAdditionalArgs = [] protected String customProjectName protected Boolean customProjectNameSet @@ -157,6 +158,7 @@ class ComposeSettings { r.pullAdditionalArgs = new ArrayList<>(this.pullAdditionalArgs) r.upAdditionalArgs = new ArrayList<>(this.upAdditionalArgs) r.downAdditionalArgs = new ArrayList<>(this.downAdditionalArgs) + r.composeAdditionalArgs = new ArrayList<>(this.composeAdditionalArgs) r.projectNamePrefix = this.projectNamePrefix