A Next.js app can't connect to private Redis URL during deploy
spiceee
PROOP

a year ago

Next.js needs to connect to Redis to generate static pages during deploy.

I'm already including `?family=0' in redisio and sleeping for 10 seconds before starting the Next build. No dice.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

2 Replies

brody
EMPLOYEE

a year ago

The private network is not accessible during build.

Two options -

  • Use the public network during build and the private network during runtime.

  • Do not connect to redis during build, generate the pages during runtime before starting your app.

For option #2 make sure to use a health check so that Railway does not switch over web traffic until your application has actually started.


spiceee
PROOP

a year ago

Got it. Thanks for the fast response. Will try something along those lines.


Status changed to Solved brody over 1 year ago


Loading...