From 176dc79f46ef813582390e066aff56d91559c4a6 Mon Sep 17 00:00:00 2001 From: Joana Hrotko Date: Tue, 7 May 2024 13:42:08 +0100 Subject: [PATCH] Add documentation for --menu up option and COMPOSE_MENU environemnt variable Signed-off-by: Joana Hrotko --- cmd/compose/up.go | 1 - docs/reference/compose.md | 3 +++ docs/reference/compose_up.md | 1 + docs/reference/docker_compose.yaml | 3 +++ docs/reference/docker_compose_up.yaml | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/compose/up.go b/cmd/compose/up.go index c6a2a66a7d..49e670d673 100644 --- a/cmd/compose/up.go +++ b/cmd/compose/up.go @@ -165,7 +165,6 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service, ex flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration 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 (Experimental). Incompatible with --detach.") - flags.MarkHidden("menu") //nolint:errcheck return upCmd } diff --git a/docs/reference/compose.md b/docs/reference/compose.md index 09a4c69da9..7b55f907db 100644 --- a/docs/reference/compose.md +++ b/docs/reference/compose.md @@ -177,6 +177,9 @@ If flags are explicitly set on the command line, the associated environment vari Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned containers for the project. +Setting the `COMPOSE_MENU` environment variable to `false` disabled the helper menu when running `docker compose up` +in detached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu. + ### Use Dry Run mode to test your command Use `--dry-run` flag to test a command without changing your application stack state. diff --git a/docs/reference/compose_up.md b/docs/reference/compose_up.md index 3829963953..21c0a4eb70 100644 --- a/docs/reference/compose_up.md +++ b/docs/reference/compose_up.md @@ -17,6 +17,7 @@ Create and start containers | `--dry-run` | | | Execute command in dry run mode | | `--exit-code-from` | `string` | | Return the exit code of the selected service container. Implies --abort-on-container-exit | | `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed | +| `--menu` | | | Enable interactive shortcuts when running attached (Experimental). Incompatible with --detach. | | `--no-attach` | `stringArray` | | Do not attach (stream logs) to the specified services | | `--no-build` | | | Don't build an image, even if it's policy | | `--no-color` | | | Produce monochrome output | diff --git a/docs/reference/docker_compose.yaml b/docs/reference/docker_compose.yaml index f725467df8..c7c50ba328 100644 --- a/docs/reference/docker_compose.yaml +++ b/docs/reference/docker_compose.yaml @@ -118,6 +118,9 @@ long: |- Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned containers for the project. + Setting the `COMPOSE_MENU` environment variable to `false` disabled the helper menu when running `docker compose up` + in detached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu. + ### Use Dry Run mode to test your command Use `--dry-run` flag to test a command without changing your application stack state. diff --git a/docs/reference/docker_compose_up.yaml b/docs/reference/docker_compose_up.yaml index 760a32da33..cc6e92603e 100644 --- a/docs/reference/docker_compose_up.yaml +++ b/docs/reference/docker_compose_up.yaml @@ -125,7 +125,7 @@ options: description: | Enable interactive shortcuts when running attached (Experimental). Incompatible with --detach. deprecated: false - hidden: true + hidden: false experimental: false experimentalcli: false kubernetes: false