Skip to content

Add docker compose deploy command#13646

Open
ericcurtin wants to merge 1 commit intodocker:mainfrom
ericcurtin:compose-deploy
Open

Add docker compose deploy command#13646
ericcurtin wants to merge 1 commit intodocker:mainfrom
ericcurtin:compose-deploy

Conversation

@ericcurtin
Copy link

Implements a production-oriented deploy command that builds, pushes, and applies a Compose project to a Docker server with force-recreate semantics and optional health-check-based wait for zero-downtime deployments.

@ericcurtin ericcurtin requested a review from a team as a code owner March 18, 2026 21:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new production-oriented docker compose deploy command and corresponding backend/API plumbing to build/push images and apply a Compose project onto a Docker server, with optional health-check-based waiting.

Changes:

  • Introduces a new CLI command: docker compose deploy with flags for build/push, orphans removal, and wait/timeout.
  • Extends the public pkg/api Compose interface with Deploy(...) and adds DeployOptions.
  • Implements composeService.Deploy by chaining Build, optional Push, and Up.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
pkg/compose/deploy.go Backend implementation of Deploy that orchestrates Build/Push/Up.
pkg/api/api.go Adds Deploy to the public API and defines DeployOptions.
cmd/compose/deploy.go New CLI command, flags, and wiring to backend Deploy.
cmd/compose/compose.go Registers the new deploy subcommand in the root command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 34.92063% with 41 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/compose/deploy.go 50.00% 20 Missing and 1 partial ⚠️
pkg/compose/deploy.go 0.00% 20 Missing ⚠️

📢 Thoughts on this report? Let us know!

Implements a production-oriented deploy command that builds, pushes, and
applies a Compose project to a Docker server with force-recreate semantics
and optional health-check-based wait for zero-downtime deployments.

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
@ndeloof
Copy link
Contributor

ndeloof commented Mar 19, 2026

I'm not convinced this requires a dedicated command. compose up --build basically does the same (without pushing). Many production system would not build locally but better pull from a trusted registry. I also don't see --force-recreate to be a "production" requirement, what makes you feel so?

IMHO many user would have a distinct vision about what a "production" deployment looks like, and as such would just write their own minimal script to automate this compose command sequence

@ndeloof
Copy link
Contributor

ndeloof commented Mar 19, 2026

I would also suggest you open a feature request issue / talk to maintainers on slack when you have such a proposal, so we can align before you volunteer to implement the feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants