Documentation
¶
Overview ¶
Package up provides options for the compose up command
Index ¶
- func WithAbortOnContainerExit() compose.SetComposeUpOption
- func WithAbortOnContainerFailure() compose.SetComposeUpOption
- func WithAlwaysRecreateDeps() compose.SetComposeUpOption
- func WithAttach(service string) compose.SetComposeUpOption
- func WithAttachDependencies() compose.SetComposeUpOption
- func WithBuild() compose.SetComposeUpOption
- func WithDetach() compose.SetComposeUpOption
- func WithExitCodeFrom(service string) compose.SetComposeUpOption
- func WithForceRecreate() compose.SetComposeUpOption
- func WithMenu() compose.SetComposeUpOption
- func WithNoAttach(service string) compose.SetComposeUpOption
- func WithNoBuild() compose.SetComposeUpOption
- func WithNoColor() compose.SetComposeUpOption
- func WithNoDeps() compose.SetComposeUpOption
- func WithNoLogPrefix() compose.SetComposeUpOption
- func WithNoRecreate() compose.SetComposeUpOption
- func WithNoStart() compose.SetComposeUpOption
- func WithProfiles(profiles ...string) compose.SetComposeUpOption
- func WithPull(policy PullPolicy) compose.SetComposeUpOption
- func WithQuietPull() compose.SetComposeUpOption
- func WithRemoveOrphans() compose.SetComposeUpOption
- func WithRenewAnonVolumes() compose.SetComposeUpOption
- func WithScale(service string, num int) compose.SetComposeUpOption
- func WithTimeout(timeout int) compose.SetComposeUpOption
- func WithTimestamps() compose.SetComposeUpOption
- func WithWait() compose.SetComposeUpOption
- func WithWaitTimeout(timeout int) compose.SetComposeUpOption
- func WithWatch() compose.SetComposeUpOption
- func WithWriter(writer io.Writer) compose.SetComposeUpOption
- func WithYes() compose.SetComposeUpOption
- type PullPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAbortOnContainerExit ¶
func WithAbortOnContainerExit() compose.SetComposeUpOption
WithAbortOnContainerExit sets the abort on container exit option to true
--abort-on-container-exit Stops all containers if any container was stopped. Incompatible with --detach
func WithAbortOnContainerFailure ¶
func WithAbortOnContainerFailure() compose.SetComposeUpOption
WithAbortOnContainerFailure sets the abort on container failure option to true
--abort-on-container-failure Stops all containers if any container exited with failure. Incompatible with --detach
func WithAlwaysRecreateDeps ¶
func WithAlwaysRecreateDeps() compose.SetComposeUpOption
WithAlwaysRecreateDeps sets the always recreate deps option to true
--always-recreate-deps Recreate dependent containers. Incompatible with --no-recreate.
func WithAttach ¶
func WithAttach(service string) compose.SetComposeUpOption
WithAttach sets the services to the attach option
--attach Restricts attaching to the specified service. Incompatible with --attach-dependencies.
func WithAttachDependencies ¶
func WithAttachDependencies() compose.SetComposeUpOption
WithAttachDependencies sets the attach dependencies option to true
--attach-dependencies Automatically attach to log output of dependent services
func WithBuild ¶
func WithBuild() compose.SetComposeUpOption
WithBuild sets the build option to true
--build Build images before starting containers
func WithDetach ¶
func WithDetach() compose.SetComposeUpOption
WithDetach sets the detach option to true
--detach Run containers in the background.
func WithExitCodeFrom ¶
func WithExitCodeFrom(service string) compose.SetComposeUpOption
WithExitCodeFrom sets the exit code from option
--exit-code-from Return the exit code of the selected service container. Implies --abort-on-container-exit
func WithForceRecreate ¶
func WithForceRecreate() compose.SetComposeUpOption
WithForceRecreate sets the force recreate option to true
--force-recreate Recreate containers even if their configuration and image haven't changed
func WithMenu ¶
func WithMenu() compose.SetComposeUpOption
WithMenu sets the menu option to true
--menu Enable interactive shortcuts when running attached. Incompatible with --detach. Can also be enable/disable by setting COMPOSE_MENU environment var.
func WithNoAttach ¶
func WithNoAttach(service string) compose.SetComposeUpOption
WithNoAttach sets a single service to not attach to the logs
--no-attach Do not attach (stream logs) to the specified service
note: there is a current limitation in the compose cli where you cannot use --no-attach aka (WithNoAttach) with multiple services use sc.WithNoAttach() instead on one or multiple services as needed.
func WithNoBuild ¶
func WithNoBuild() compose.SetComposeUpOption
WithNoBuild sets the no build option to true
--no-build Don't build an image, even if it's policy
func WithNoColor ¶
func WithNoColor() compose.SetComposeUpOption
WithNoColor sets the no color option to true
--no-color Produce monochrome output
func WithNoDeps ¶
func WithNoDeps() compose.SetComposeUpOption
WithNoDeps sets the no deps option to true
--no-deps Don't start linked services
func WithNoLogPrefix ¶
func WithNoLogPrefix() compose.SetComposeUpOption
WithNoLogPrefix sets the no log prefix option to true
--no-log-prefix Don't print prefix in logs
func WithNoRecreate ¶
func WithNoRecreate() compose.SetComposeUpOption
WithNoRecreate sets the no recreate option to true
--no-recreate If containers already exist, don't recreate them. Incompatible with --force-recreate.
func WithNoStart ¶
func WithNoStart() compose.SetComposeUpOption
WithNoStart sets the no start option to true
--no-start Don't start the services after creating them
func WithProfiles ¶ added in v0.1.3
func WithProfiles(profiles ...string) compose.SetComposeUpOption
WithProfile sets the profile option
--profile Activate profiles
func WithPull ¶
func WithPull(policy PullPolicy) compose.SetComposeUpOption
WithPull sets the pull option
--pull policy Pull image before running ("always"|"missing"|"never")
func WithQuietPull ¶
func WithQuietPull() compose.SetComposeUpOption
WithQuietPull sets the quiet pull option to true
--quiet-pull Pull without printing progress information
func WithRemoveOrphans ¶
func WithRemoveOrphans() compose.SetComposeUpOption
WithRemoveOrphans sets the remove orphans option to true
--remove-orphans Remove containers for services not defined in the Compose file
func WithRenewAnonVolumes ¶
func WithRenewAnonVolumes() compose.SetComposeUpOption
WithRenewAnonVolumes sets the renew anon volumes option to true
--renew-anon-volumes Recreate anonymous volumes instead of retrieving data from the previous containers
func WithScale ¶
func WithScale(service string, num int) compose.SetComposeUpOption
WithScale sets the scale option
--scale Scale SERVICE to NUM instances. Overrides the scale setting in the Compose file if present.
func WithTimeout ¶
func WithTimeout(timeout int) compose.SetComposeUpOption
--timeout Use this timeout in seconds for container shutdown when attached or when containers are already running
func WithTimestamps ¶
func WithTimestamps() compose.SetComposeUpOption
WithTimestamps sets the timestamps option to true
--timestamps Show timestamps
func WithWait ¶
func WithWait() compose.SetComposeUpOption
WithWait sets the wait option to true
--wait Wait for services to be running|healthy. Implies detached mode.
func WithWaitTimeout ¶
func WithWaitTimeout(timeout int) compose.SetComposeUpOption
WithWaitTimeout sets the wait timeout option
--wait-timeout Maximum duration in seconds to wait for the project to be running|healthy
func WithWatch ¶
func WithWatch() compose.SetComposeUpOption
func WithWriter ¶
func WithWriter(writer io.Writer) compose.SetComposeUpOption
WithWriter sets the writer for the compose up command stdout and stderr
if writer is nil, it will use os.Stdout as a fallback
func WithYes ¶
func WithYes() compose.SetComposeUpOption
WithYes sets the yes option to true
-y, --yes Assume "yes" as answer to all prompts and run non-interactively
Types ¶
type PullPolicy ¶
type PullPolicy string
const ( PullPolicyAlways PullPolicy = "always" PullPolicyMissing PullPolicy = "missing" PullPolicyNever PullPolicy = "never" )