Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 2.12.2 — fix: WaxFlow could not be built from a fresh clone

`sync-web/public/` was never committed, but `sync-web/Dockerfile` COPYs it out of
the builder stage. So a clean checkout failed:

failed to compute cache key: failed to calculate checksum of ref ... /app/public

**Nobody could build WaxFlow from a fresh clone.** It only worked for people whose
working copy already happened to have the directory — which is why it went
unnoticed until CI built from a clean checkout for the first time and the web
image failed while api and worker succeeded.

Fixed by tracking `sync-web/public/.gitkeep` and adding `RUN mkdir -p /app/public`
so the COPY cannot fail even if the directory is absent from the build context.

Also documented, because it looked alarming during review: `NEXT_PUBLIC_API_URL`
is a build arg, but the frontend calls a RELATIVE `/api` and `next.config.js`
rewrites it server-side from `INTERNAL_API_URL` at RUNTIME. Nothing user-specific
is baked into the web image, which is what lets one published image serve every
install.


## 2.12.1 — "Update Now" actually requests an update

`POST /api/admin/update` wrote the literal string `requested at <timestamp>` into
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.12.1
2.12.2
8 changes: 8 additions & 0 deletions sync-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
COPY . .
# Belt and braces: public/ is tracked (see public/.gitkeep), but the COPY in the
# runner stage hard-fails if it is ever missing, which is how fresh-clone builds
# broke. Guarantee it exists rather than depending on the build context.
RUN mkdir -p /app/public

# NOTE: the frontend calls a RELATIVE /api and next.config.js rewrites it
# server-side using INTERNAL_API_URL at RUNTIME, so nothing user-specific is
# baked in here. That is what makes one published image work for every install.
ARG NEXT_PUBLIC_API_URL=http://localhost:8402
ARG INTERNAL_API_URL=http://sync-api:8402
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
Expand Down
9 changes: 9 additions & 0 deletions sync-web/public/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Next.js expects a public/ directory and sync-web/Dockerfile COPYs it out of the
builder stage. It was never committed, so `docker compose up -d --build` from a
fresh clone failed with:

failed to compute cache key: failed to calculate checksum of ref ... /app/public

i.e. nobody could build WaxFlow from a clean checkout. It only worked for people
whose working copy already had the directory. Keep this file so the directory
always exists.
Loading