From 239e211d3dd76328e6b9f9d8427faacfc6bd3022 Mon Sep 17 00:00:00 2001 From: rabbitblood Date: Thu, 16 Apr 2026 03:25:58 -0700 Subject: [PATCH] fix(compose): platform build context must be repo root, not ./platform MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The platform Dockerfile COPYs paths relative to the repo root — \`COPY platform/go.mod\`, \`COPY platform/migrations\`, \`COPY workspace-configs-templates\`. The compose file was setting \`context: ./platform\`, which silently caused those COPY layers to miss + stop invalidating cache. Symptom (caught 2026-04-16 10:22 UTC): after PR #417 (memory schema migration 023) merged + I ran \`docker compose up -d --build platform\`, the rebuild was a no-op. Image SHA didn't change, container booted with old migration set, \`Applied 22 migrations\` instead of the expected 23. Migration 023 file was on disk locally but never reached the image. Workaround was \`docker build -t molecule-monorepo-platform:fresh -f platform/Dockerfile .\` from repo root → SHA changed, migration 023 applied. This commit makes \`docker compose up -d --build platform\` work correctly without the manual workaround. CI workflow already builds with \`context: .\` + \`file: ./platform/Dockerfile\` (per the comment at the top of platform/Dockerfile). This change just aligns the local compose file with what CI does. Co-Authored-By: Claude Opus 4.6 (1M context) --- docker-compose.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3b5f93b5..9f82f18c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,8 +102,17 @@ services: # --- Platform --- platform: build: - context: ./platform - dockerfile: Dockerfile + # Build context MUST be repo root, not ./platform — the Dockerfile + # COPYs `platform/migrations`, `platform/go.mod`, + # `workspace-configs-templates/` etc. via repo-relative paths so it + # can bake in templates + migrations alongside the platform binary. + # When context was ./platform earlier, docker silently cached an + # earlier image (the COPY platform/migrations resolved to nothing + # under ./platform/, so layers stopped invalidating) — manifested + # as migration 023 not landing after PR #417 merged. CI workflow + # already uses context=. , this aligns local with CI. + context: . + dockerfile: platform/Dockerfile depends_on: postgres: condition: service_healthy