Skip to content

chore: run as a Next standalone image on Railway - #51

Merged
Voxelot merged 2 commits into
mainfrom
nj/chore/railway-deploy
Sep 16, 2026
Merged

Voxelot merged 2 commits into
mainfrom
nj/chore/railway-deploy

Conversation

@nelitow

@nelitow nelitow commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

graphql.fuel.network moves off Vercel to Railway. The image builds Next.js in standalone mode and runs its node server; the docs are unchanged. The service is already running as fuel-graphql-docs in the Railway project fuel-web; DNS has not moved yet.

Railway's vulnerability scan refused the lockfile's next 13.5.6, so the lockfile moves next to 13.5.11 within the same ^13 range in package.json; only next and its swc binaries changed.

Changes

Area Change
Next config next.config.js sets output: "standalone" only when NEXT_OUTPUT=standalone, so the Vercel build is unchanged
next version package-lock.json resolves next 13.5.11 instead of 13.5.6
Image Dockerfile runs npm ci and the standalone build on node 18, then runs server.js on Railway's PORT
Railway config railway.json sets the Dockerfile path, healthcheck on / and restart on failure
Deploy workflow deploy-railway.yml runs railway up on every push to main. Skips itself until the RAILWAY_TOKEN secret exists; redundant once the service is connected to GitHub
Docker context .dockerignore excludes node_modules, .next, .git and .vercel

@cursor

cursor Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are deploy packaging and a patch-level Next bump; standalone output is gated behind an env var so default builds are unchanged.

Overview
graphql.fuel.network is set up to deploy on Railway as a containerized Next.js app instead of relying only on Vercel-style hosting.

A multi-stage Dockerfile builds the docs with NEXT_OUTPUT=standalone, copies the standalone server plus static assets, listens on Railway’s PORT, and includes a root healthcheck. .dockerignore keeps build context small, and railway.json points Railway at that Dockerfile with deploy healthcheck and restart-on-failure settings.

next.config.js now enables output: 'standalone' only when NEXT_OUTPUT=standalone, so existing non-Docker builds stay the same. package-lock.json bumps Next from 13.5.6 to 13.5.11 (and matching @next/* / SWC packages) within the existing ^13 range—called out as addressing Railway’s vulnerability scan on the older lockfile resolution.

Reviewed by Cursor Bugbot for commit ffa385b. Bugbot is set up for automated code reviews on this repo. Configure here.

@Voxelot
Voxelot merged commit 74f783a into main Sep 16, 2026
10 of 13 checks passed
@Voxelot
Voxelot deleted the nj/chore/railway-deploy branch September 16, 2026 02:06

This branch had an error being deployed

1 failed deployment
Preview — ffa385be Deployed Sep 15, 2026 by vercel[bot]
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.

3 participants