[bug] docker-compose.yml + docker-compose.infra.yml duplicate-service definitions break docker compose build on main #377

Closed
opened 2026-05-11 03:54:41 +00:00 by hongming-pc2 · 0 comments
Owner

Bug — docker compose build fails with services.langfuse-db-init conflicts with imported resource

Symptom (on main HEAD 108b9a54):

$ cd ~/molecule-core && docker compose build platform
services.langfuse-db-init conflicts with imported resource

Root cause: commit 8cd52fc6 ("infra(docker-compose): include infra services so docker compose up starts Temporal") added a top-level include: - docker-compose.infra.yml to docker-compose.yml, but did NOT remove the now-duplicate service definitions from docker-compose.yml. Both files define the same names:

overlap (services + volumes):
  postgres
  redis
  langfuse-db-init
  pgdata
  redisdata
  clickhousedata

Docker Compose v2 errors out on duplicate definitions between an include: and the main file — so right now docker compose build/up on main is broken for everyone who doesn't have a pre-built molecule-core-platform:latest image in their local Docker cache.

Impact: any first-clone or post-docker system prune developer can't bring up the local stack. Discovered while trying to redeploy the platform image to pick up the PR #331 (issue #310) ResponseHeaderTimeout 60→180s fix — workaround was direct docker build -f workspace-server/Dockerfile ., but that's not the documented developer flow.

Suggested fix (one of):

  1. Remove duplicates from docker-compose.yml — let include: docker-compose.infra.yml be the SSOT for postgres/redis/langfuse-db-init/volumes. Simpler. Matches the intent of 8cd52fc6. Easy follow-up to 40736a41 (digest pinning).
  2. Drop the include: directive — revert the intent of 8cd52fc6 and require users to docker compose -f docker-compose.yml -f docker-compose.infra.yml up explicitly. More work for users.

Option 1 is the cleaner fix. Should also update 40736a41's digest pins so they live in docker-compose.infra.yml (one place), not both.

Severity: medium (blocks local-stack bootstrap; existing deployments unaffected; workaround = direct docker build).

Reproduction:

$ git checkout main && git pull
$ docker compose build platform
services.langfuse-db-init conflicts with imported resource

Workaround:

$ docker build -f workspace-server/Dockerfile -t molecule-core-platform:latest .
$ docker compose up -d --no-build platform

Filed by hongming-pc2 while restarting platform to pick up #310's ResponseHeaderTimeout fix.

## Bug — `docker compose build` fails with `services.langfuse-db-init conflicts with imported resource` **Symptom (on `main` HEAD `108b9a54`):** ``` $ cd ~/molecule-core && docker compose build platform services.langfuse-db-init conflicts with imported resource ``` **Root cause:** commit `8cd52fc6` ("infra(docker-compose): include infra services so `docker compose up` starts Temporal") added a top-level `include: - docker-compose.infra.yml` to `docker-compose.yml`, but did NOT remove the now-duplicate service definitions from `docker-compose.yml`. Both files define the same names: ``` overlap (services + volumes): postgres redis langfuse-db-init pgdata redisdata clickhousedata ``` Docker Compose v2 errors out on duplicate definitions between an `include:` and the main file — so right now `docker compose build/up` on main is **broken** for everyone who doesn't have a pre-built `molecule-core-platform:latest` image in their local Docker cache. **Impact:** any first-clone or post-`docker system prune` developer can't bring up the local stack. Discovered while trying to redeploy the platform image to pick up the PR #331 (issue #310) `ResponseHeaderTimeout 60→180s` fix — workaround was direct `docker build -f workspace-server/Dockerfile .`, but that's not the documented developer flow. **Suggested fix (one of):** 1. **Remove duplicates from `docker-compose.yml`** — let `include: docker-compose.infra.yml` be the SSOT for postgres/redis/langfuse-db-init/volumes. Simpler. Matches the intent of `8cd52fc6`. Easy follow-up to `40736a41` (digest pinning). 2. **Drop the `include:` directive** — revert the intent of `8cd52fc6` and require users to `docker compose -f docker-compose.yml -f docker-compose.infra.yml up` explicitly. More work for users. Option 1 is the cleaner fix. Should also update `40736a41`'s digest pins so they live in `docker-compose.infra.yml` (one place), not both. **Severity:** medium (blocks local-stack bootstrap; existing deployments unaffected; workaround = direct `docker build`). **Reproduction:** ``` $ git checkout main && git pull $ docker compose build platform services.langfuse-db-init conflicts with imported resource ``` Workaround: ``` $ docker build -f workspace-server/Dockerfile -t molecule-core-platform:latest . $ docker compose up -d --no-build platform ``` Filed by hongming-pc2 while restarting platform to pick up #310's ResponseHeaderTimeout fix.
triage-operator added the tier:low label 2026-05-11 04:23:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#377