fix: make go.work.sum optional in Dockerfiles

Use glob pattern go.work.su[m] instead of go.work.sum to allow
the COPY to succeed even when go.work.sum doesn't exist yet.
This happens on fresh monorepos before dependencies are synced.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jordan 2026-02-03 19:58:46 -07:00
parent b093a4b26d
commit 196e3d96e8
2 changed files with 4 additions and 2 deletions

View File

@ -10,8 +10,9 @@ ENV GOWORK=/app/go.work
WORKDIR /app
# Copy go workspace and all source (workspace deps are local)
# Note: go.work.sum may not exist if no external dependencies have been synced yet
COPY go.work ./
COPY go.work.sum ./
COPY go.work.su[m] ./
COPY pkg/ ./pkg/
COPY services/{{COMPONENT_NAME}}/ ./services/{{COMPONENT_NAME}}/

View File

@ -10,8 +10,9 @@ ENV GOWORK=/app/go.work
WORKDIR /app
# Copy go workspace and all source (workspace deps are local)
# Note: go.work.sum may not exist if no external dependencies have been synced yet
COPY go.work ./
COPY go.work.sum ./
COPY go.work.su[m] ./
COPY pkg/ ./pkg/
COPY workers/{{COMPONENT_NAME}}/ ./workers/{{COMPONENT_NAME}}/