Skip to content

[BUG] selecting compose.override.yaml in the editor ignores the main compose.yaml #884

@legeana

Description

@legeana

Description

Dockhand doesn't take the main compose.yaml into account if compose.override.yaml is being used as the primary file. This is very unfortunate because there are a number of docker compose distributions provided by service developers where the operator is expected to primarily edit compose.override.yaml, e.g. https://github.com/zulip/docker-zulip.

To fix this Dockhand should run Command: docker compose -p test-override -f /mnt/user/apps/test-override/compose.yaml -f /mnt/user/apps/test-override/compose.override.yaml up -d --remove-orphans --force-recreate as it does when compose.yaml is selected in the same directory.

A somewhat more comprehensive fix would be to improve support of switching between main and override compose files, maybe have a list of compose files passed to -f as a generic solution and allow the user to quickly switch between them in the UI.

P.S. There is another bug I discovered related to compose.override.yaml

Switching between compose.yaml and compose.override.yaml results in the content override prompt: Image instead of switching the file. I believe this shows that Dockhand assumes a single compose file in the UI, and compose.override.yaml support is inconsistent.

P.P.S. This is not the same as #367 where seemingly the main compose file is used, but it is not very clear.

Steps to reproduce

  1. Create compose.yaml
# cat compose.yaml
services:
  app:
    image: nginx:alpine
    restart: unless-stopped
  app2:
    image: nginx:alpine
    restart: unless-stopped
  1. Create compose.override.yaml
# cat compose.override.yaml
services:
  app2:
    image: nicolaka/netshoot
    command: sleep 1000
  1. Open compose.override.yaml in Dockhand: Image
  2. Press Save and redeploy, this runs Command: docker compose -p test-override -f /mnt/user/apps/test-override/compose.override.yaml up -d --remove-orphans --force-recreate
  3. Observe only the app2 from override running.
Image

Logs

Current log:

2026-04-05T15:31:19.141Z [Stack:test-override] ----------------------------------------
2026-04-05T15:31:19.141Z [Stack:test-override] EXECUTE LOCAL COMPOSE
2026-04-05T15:31:19.141Z [Stack:test-override] ----------------------------------------
2026-04-05T15:31:19.141Z [Stack:test-override] Operation: up
2026-04-05T15:31:19.141Z [Stack:test-override] Command: docker compose -p test-override -f /mnt/user/apps/test-override/compose.override.yaml up -d --remove-orphans --force-recreate
2026-04-05T15:31:19.141Z [Stack:test-override] Working directory: /mnt/user/apps/test-override
2026-04-05T15:31:19.141Z [Stack:test-override] Compose file: /mnt/user/apps/test-override/compose.override.yaml
2026-04-05T15:31:19.141Z [Stack:test-override] DOCKER_HOST: (local socket)
2026-04-05T15:31:19.141Z [Stack:test-override] DOCKER_API_VERSION: (not set - native negotiation)
2026-04-05T15:31:19.141Z [Stack:test-override] Force recreate: true
2026-04-05T15:31:19.141Z [Stack:test-override] Remove volumes: false
2026-04-05T15:31:19.141Z [Stack:test-override] Service name: (all services)
2026-04-05T15:31:19.141Z [Stack:test-override] Env vars count: 0
2026-04-05T15:31:19.141Z [Stack:test-override] Spawning docker compose process...
2026-04-05T15:31:19.907Z [Stack:test-override] ----------------------------------------
2026-04-05T15:31:19.907Z [Stack:test-override] COMPOSE PROCESS COMPLETE
2026-04-05T15:31:19.907Z [Stack:test-override] ----------------------------------------


Expected log:

2026-04-05T15:50:24.868Z [Stack:test-override] ----------------------------------------
2026-04-05T15:50:24.868Z [Stack:test-override] EXECUTE LOCAL COMPOSE
2026-04-05T15:50:24.868Z [Stack:test-override] ----------------------------------------
2026-04-05T15:50:24.868Z [Stack:test-override] Operation: up
2026-04-05T15:50:24.868Z [Stack:test-override] Command: docker compose -p test-override -f /mnt/user/apps/test-override/compose.yaml -f /mnt/user/apps/test-override/compose.override.yaml up -d --remove-orphans --force-recreate
2026-04-05T15:50:24.868Z [Stack:test-override] Working directory: /mnt/user/apps/test-override
2026-04-05T15:50:24.868Z [Stack:test-override] Compose file: /mnt/user/apps/test-override/compose.yaml
2026-04-05T15:50:24.868Z [Stack:test-override] DOCKER_HOST: (local socket)
2026-04-05T15:50:24.868Z [Stack:test-override] DOCKER_API_VERSION: (not set - native negotiation)
2026-04-05T15:50:24.868Z [Stack:test-override] Force recreate: true
2026-04-05T15:50:24.868Z [Stack:test-override] Remove volumes: false
2026-04-05T15:50:24.868Z [Stack:test-override] Service name: (all services)
2026-04-05T15:50:24.868Z [Stack:test-override] Env vars count: 0
2026-04-05T15:50:24.868Z [Stack:test-override] Spawning docker compose process...
2026-04-05T15:50:26.331Z [Stack:test-override] ----------------------------------------
2026-04-05T15:50:26.331Z [Stack:test-override] COMPOSE PROCESS COMPLETE
2026-04-05T15:50:26.331Z [Stack:test-override] ----------------------------------------

Browser logs

Dockhand version

1.0.24

Hawser version (if used)

No response

Connection mode

socket

Please confirm the following

  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions