← Recipes
Deployment
Deploy Docker Compose with approval
Require operator acknowledgement, pull pinned Compose images, start the stack, and record its status.
Supported platforms
LinuxmacOSWindows
Prerequisites
- Docker Engine with Compose v2
- A reviewed Compose project with pinned image versions
Workflow YAML
description: Pull and deploy a Docker Compose project after explicit acknowledgement.
params:
- name: project_dir
default: /srv/app
- name: compose_file
default: compose.yaml
steps:
- id: confirm
action: human.task
with:
prompt: Acknowledge deployment of the Compose project in ${params.project_dir}
- id: pull
depends: [confirm]
working_dir: ${params.project_dir}
run: docker compose -f '${params.compose_file}' pull
timeout_sec: 900
- id: deploy
depends: [pull]
working_dir: ${params.project_dir}
run: docker compose -f '${params.compose_file}' up -d --remove-orphans
timeout_sec: 900
- id: status
depends: [deploy]
working_dir: ${params.project_dir}
run: docker compose -f '${params.compose_file}' ps
stdout:
artifact: compose-status.txt
Review before running
Replace example values, configure the listed secrets, and review every command for your environment. Syntax validation does not make a community workflow trusted.
Running this workflow with a team?
The Team plan adds SSO, role-based access, audit logs, incident routing, and priority support for three self-hosted Dagu servers. Start a 14-day trial without a credit card.
Start Team trial