Skip to content

fix(docker): auto-read version from package.json in all Dockerfiles#96

Merged
rockfridrich merged 1 commit intomainfrom
fix/key-version-reporting
Feb 1, 2026
Merged

fix(docker): auto-read version from package.json in all Dockerfiles#96
rockfridrich merged 1 commit intomainfrom
fix/key-version-reporting

Conversation

@rockfridrich
Copy link
Copy Markdown
Owner

Summary

  • Key Dockerfile was missing NEXT_PUBLIC_VERSION, GIT_SHA, and BUILD_TIME build args — health endpoint always reported stale fallback
  • All 3 Dockerfiles now extract version from the app's package.json at build time via .env.local, with build arg override still supported
  • Health endpoints now fall back to "unknown" instead of hardcoded stale version strings

Root Cause

Hub deployed 0.3.0-rc.2 correctly because it already had NEXT_PUBLIC_VERSION as a build ARG (defaulting to 0.1.0, but Railway was setting it). Key and developers Dockerfiles had no version ARG at all, so their health endpoints fell back to the hardcoded "0.3.0-rc.1.1".

Test plan

  • After deploy, curl https://key.villa.cash/api/health | jq .version returns 0.3.0-rc.2
  • After deploy, curl https://docs.villa.cash/api/health | jq .version returns 0.3.0-rc.2
  • bun typecheck passes (18/18)
  • bun lint passes (6/6, 0 errors)

🤖 Generated with Claude Code

Key Dockerfile was missing NEXT_PUBLIC_VERSION, GIT_SHA, and BUILD_TIME
build args entirely. All three Dockerfiles had stale hardcoded fallback
0.1.0 as the version default, meaning Railway builds never reported the
correct version.

Now all Dockerfiles extract version from the app's package.json at build
time via .env.local, with build arg override still supported. Health
endpoints use "unknown" as fallback instead of stale version strings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rockfridrich rockfridrich merged commit 207e5d8 into main Feb 1, 2026
10 of 12 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

🤖 Villa Code Review Bot

✅ No critical issues found

Code looks clean! Ship it. 🚀


Reviewed 3 file(s)

@rockfridrich rockfridrich deleted the fix/key-version-reporting branch February 1, 2026 18:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

🎉 Merged! Railway will auto-deploy to construction.villa.cash.

Create v* tag to deploy to production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant