-
-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Summary
The advanced setting Command field behavior contradicts documentation:
-
Docs (features) say "append command"
-
Actual behavior: the field fully replaces the command
Setting --force-recreate in the field produces docker --force-recreate or just --force-recreate instead of the expected docker compose -p <name> -f <path> up -d --build --remove-orphans --force-recreate.
Steps to reproduce
- Create a compose service
- Set the command field to
--force-recreate(via API:compose.updatewith{"command":"--force-recreate"}) - Deploy
- Check the deploy logs — the command is
docker --force-recreate, not appended to the default
Code reference
In packages/server/src/utils/builders/compose.ts#L82, createCommand returns the custom command immediately without merging with the default:
if (compose.command) {
return `${sanitizeCommand(compose.command)}`; // early return, no append
}Proposal
Add a separate "Append flags" field (or rename + fix the current one) that appends to the default command rather than replacing it. This would let users add flags like --force-recreate without needing to replicate the entire default command (which varies by compose type and settings).
The current full-replacement behavior is useful for advanced cases, so keeping both options would be ideal.
Related issues
- #540 — original request for command control
- #1040 — more flexible run command
- #2170 — force-recreate needed for volume mounts (our exact use case)
- #1647 — custom command for multiple steps