Skip to content

Compose command field replaces instead of appending (contradicts docs) #142

Description

@LeonardoRick

Summary

The advanced setting Command field behavior contradicts documentation:

  • Docs (features) say "append command"

  • Actual behavior: the field fully replaces the command

Image

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

  1. Create a compose service
  2. Set the command field to --force-recreate (via API: compose.update with {"command":"--force-recreate"})
  3. Deploy
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions