Skip to main content

defang compose

Work with local Compose files

Synopsis

Define and deploy multi-container applications with Defang. Most compose commands require a "compose.yaml" file. The simplest "compose.yaml" file with a single service is:

services: app: # the name of the service build: . # the folder with the Dockerfile and app sources (. means current folder) ports:

  • 80 # the port the service listens on for HTTP requests

Options

  -h, --help                    help for compose
--pulumi-backend string specify an alternate Pulumi backend URL or "pulumi-cloud"

Options inherited from parent commands

      --color color-mode       colorize output; one of [never auto always] (default auto)
-C, --cwd string change directory before running the command
--debug debug logging for troubleshooting the CLI
--dry-run dry run (don't actually change anything)
-f, --file stringArray compose file path(s)
--json show output in JSON format
--non-interactive disable interactive prompts / no TTY (default true)
-p, --project-name string project name
-P, --provider provider bring-your-own-cloud provider; one of [defang aws digitalocean gcp] (default auto)
-s, --stack string stack name (for BYOC providers)
--utc show timestamps in UTC timezone
-v, --verbose verbose logging
--workspace name-or-id workspace to use (default personal tenant)

SEE ALSO

Auto generated by spf13/cobra on 20-Feb-2026