JMCP: Papers - jmcp/add-deployment-config-dockerfile-fly-tom-CSMbptzY#5
Closed
landigf wants to merge 1 commit into
Closed
JMCP: Papers - jmcp/add-deployment-config-dockerfile-fly-tom-CSMbptzY#5landigf wants to merge 1 commit into
landigf wants to merge 1 commit into
Conversation
…and health check endpoint
Owner
Author
|
Closing: will integrate valuable features directly on main to avoid cascade merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review Summary
Change Summary
Adds Fly.io deployment configuration for the Papers Next.js app:
papers, regioniad, shared-cpu-1x/512 MB), health check at/papers/api/healthapps/web/app/api/health/route.ts) — returns JSON{ status, mode, timestamp }output: "standalone"andoutputFileTracingRootpointing to monorepo rootValidation Confidence: Medium-High
The structure is textbook-correct for a Next.js standalone + Fly deployment. The
outputFileTracingRootcorrectly resolves to the monorepo root, and the Dockerfile COPY paths align with the standalone output layout.Risks
public/folder copy in Dockerfilepublic/. If any static assets exist (or are added later), the container will 404 on them. ACOPY --from=build /app/apps/web/public ./apps/web/publicline should be added even if the folder is currently empty — it's a silent future footgun.getPapersConfig@papers/configreads env vars that aren't set (e.g. DB URLs), the health check could throw instead of returning 200. Fly's check would then mark the machine unhealthy and restart-loop. A health endpoint should ideally be dependency-free or catch errors gracefully.min_machines_running = 0fly.tomlonly sets public env vars. Any secrets (DATABASE_URL, API keys) will needfly secrets setbefore first deploy — not captured anywhere in the diff.node:23-slimis unpinnednode:23-slimwill float to the latest Node 23 patch. Pinning a digest or using an LTS tag (e.g.22-slim) would improve reproducibility.Verdict
Structurally sound. Risk #1 (missing
public/copy) should be fixed before merge — it's a one-liner and prevents a class of silent breakage. Risk #2 is worth hardening (wrap the config call in a try/catch or make health zero-dep). The rest are advisory.