Skip to content

Railway Deployment #525d25 fix: inline start.sh into railway.toml#80

Closed
railway-app[bot] wants to merge 1 commit intomasterfrom
railway/fix-deploy-525d25
Closed

Railway Deployment #525d25 fix: inline start.sh into railway.toml#80
railway-app[bot] wants to merge 1 commit intomasterfrom
railway/fix-deploy-525d25

Conversation

@railway-app
Copy link
Copy Markdown

@railway-app railway-app bot commented Apr 2, 2026

Problem

The deployment fails because Railpack's runner stage only copies .next/, public/, node_modules/, and package.json into the final image — the scripts/ directory is not included. The configured startCommand = "sh scripts/start.sh" therefore fails immediately with sh: can't open 'scripts/start.sh': No such file or directory, causing all healthcheck attempts to fail and the container to restart until the 5-minute timeout expires. Additionally, package.json's start script hardcodes port 8080 instead of Railway's $PORT.

Solution

Replaced the startCommand in railway.toml with an inlined version that sets NODE_OPTIONS directly and runs next start -p ${PORT:-3000}. The next binary is available via node_modules/.bin/ which is included in the image, so no external script file is needed. Using ${PORT:-3000} ensures the app binds to Railway's dynamically assigned port, allowing the healthcheck to succeed.

Changes

  • Modified railway.toml

Context

  • Deployment: #525d25
  • Failed commit: 0658552

Generated by Railway

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@ralyodio ralyodio closed this Apr 4, 2026
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