Stack Management
Update Stack
Update a stack compose file and optionally restart
PUT
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Finsys/dockhand/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Stack name (URL-encoded)
Query Parameters
Environment ID where the stack exists
Body Parameters
Updated Docker Compose file content (YAML)
Whether to restart the stack after updating. If
true, runs docker compose up -d --force-recreate.Custom path for the compose file (for updating file location)
Custom path for the .env file (for updating file location)
Original directory when moving/relocating stack files
Previous compose file path when renaming
Previous env file path when renaming
Response
Whether the update succeeded
Error message if update failed
restart=true, the endpoint uses Server-Sent Events (SSE) and includes:
Docker Compose output from the restart operation
Behavior
- If
restart=false, only saves the compose file without restarting containers - If
restart=true, uses--force-recreateto ensure environment variable changes are applied - Custom paths allow relocating stack files to different directories
- The stack must exist and be managed by Dockhand
Get Current Compose File
Before updating, you can retrieve the current compose file:Relocating Stack Files
To move stack files to a new location:Error Responses
400 Bad Request
- Compose file content is missing
- Invalid YAML syntax
- Invalid file paths
403 Forbidden
- User lacks
stacks:editpermission - User cannot access the specified environment
404 Not Found
- Stack does not exist
- Compose file not found
500 Internal Server Error
- Docker daemon error
- File system error
- Deployment failed
Permissions
Requiresstacks:edit permission for the specified environment.