From 5fa9b72ff9bf0bbf75668a60268db0f78e24189b Mon Sep 17 00:00:00 2001 From: Trevor Foster Date: Fri, 22 Nov 2024 23:31:04 -0500 Subject: [PATCH] Update wait-timeout flag usage to include the unit Signed-off-by: Trevor Foster --- cmd/compose/up.go | 4 ++-- docs/reference/compose_up.md | 2 +- docs/reference/docker_compose_up.yaml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/compose/up.go b/cmd/compose/up.go index c7cd3ef76b0..31756d6a846 100644 --- a/cmd/compose/up.go +++ b/cmd/compose/up.go @@ -26,10 +26,10 @@ import ( "github.com/compose-spec/compose-go/v2/types" "github.com/docker/cli/cli/command" - "github.com/docker/compose/v2/cmd/formatter" xprogress "github.com/moby/buildkit/util/progress/progressui" "github.com/spf13/cobra" + "github.com/docker/compose/v2/cmd/formatter" "github.com/docker/compose/v2/pkg/api" ui "github.com/docker/compose/v2/pkg/progress" "github.com/docker/compose/v2/pkg/utils" @@ -167,7 +167,7 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service) *c flags.StringArrayVar(&up.noAttach, "no-attach", []string{}, "Do not attach (stream logs) to the specified services") flags.BoolVar(&up.attachDependencies, "attach-dependencies", false, "Automatically attach to log output of dependent services") flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.") - flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration to wait for the project to be running|healthy") + flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration in seconds to wait for the project to be running|healthy") flags.BoolVarP(&up.watch, "watch", "w", false, "Watch source code and rebuild/refresh containers when files are updated.") flags.BoolVar(&up.navigationMenu, "menu", false, "Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.") diff --git a/docs/reference/compose_up.md b/docs/reference/compose_up.md index 295000734b1..410ec84b52d 100644 --- a/docs/reference/compose_up.md +++ b/docs/reference/compose_up.md @@ -51,7 +51,7 @@ If the process is interrupted using `SIGINT` (ctrl + C) or `SIGTERM`, the contai | `-t`, `--timeout` | `int` | `0` | Use this timeout in seconds for container shutdown when attached or when containers are already running | | `--timestamps` | `bool` | | Show timestamps | | `--wait` | `bool` | | Wait for services to be running\|healthy. Implies detached mode. | -| `--wait-timeout` | `int` | `0` | Maximum duration to wait for the project to be running\|healthy | +| `--wait-timeout` | `int` | `0` | Maximum duration in seconds to wait for the project to be running\|healthy | | `-w`, `--watch` | `bool` | | Watch source code and rebuild/refresh containers when files are updated. | diff --git a/docs/reference/docker_compose_up.yaml b/docs/reference/docker_compose_up.yaml index 4c895f6a65b..1474cfe2ee6 100644 --- a/docs/reference/docker_compose_up.yaml +++ b/docs/reference/docker_compose_up.yaml @@ -289,7 +289,8 @@ options: - option: wait-timeout value_type: int default_value: "0" - description: Maximum duration to wait for the project to be running|healthy + description: | + Maximum duration in seconds to wait for the project to be running|healthy deprecated: false hidden: false experimental: false