Skip to main content

Docker Compose

The docker-compose trigger recreates containers managed by Docker Compose by pulling the latest images and restarting the stack.


⚙️ Configuration Variables

WUD_TRIGGER_DOCKERCOMPOSE_{trigger_name}_BACKUP
Optionalbooleandefault: false

Back up docker-compose.yml to .back before modifying it

WUD_TRIGGER_DOCKERCOMPOSE_{trigger_name}_DRYRUN
Optionalbooleandefault: false

When enabled, only pulls the new image ahead of time without rewriting compose files or restarting

WUD_TRIGGER_DOCKERCOMPOSE_{trigger_name}_FILE
Optionalpathdefault: com.docker.compose.project.config_files

Path to the docker-compose.yml file inside the WUD container

Allowed values:Valid mounted file path
WUD_TRIGGER_DOCKERCOMPOSE_{trigger_name}_PRUNE
Optionalbooleandefault: false

Prune obsolete image versions after a successful upgrade

info

This trigger supports all common trigger configuration options and runs in batch mode by default.


🚀 Examples

Auto-Update Compose Services with Mounted Compose File

services:
whatsupdocker:
image: getwud/wud
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/stacks/app/docker-compose.yml:/wud/docker-compose.yml
environment:
- WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_FILE=/wud/docker-compose.yml
- WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_BACKUP=true
- WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_PRUNE=true