#Trying to deploy to Railway - what am I missing?

4 messages · Page 1 of 1 (latest)

pine jolt
#

Just gives me "Application failed to respond" with a 503 in the console. If anyone can point me towards a deploy guide for Railway that would be amazing niceone

Mongo set and working
Node_env set to prod
Payload_config path set
Payload_secret set

Have tried with docker and nixpacks. Have run build command before push

Gives me this after build

yarn run v1.22.19
$ yarn build && yarn serve
$ yarn copyfiles && yarn build:payload && yarn build:server
$ copyfiles -u 1 "src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}" dist/
$ cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build
$ tsc
$ cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js
[19:45:51] INFO (payload): Connected to MongoDB server successfully!
[19:45:51] INFO (payload): Starting Payload...
[19:45:52] INFO (payload): Payload Admin URL: Correct URL/admin

solemn hawkBOT
dense umbra
# pine jolt Just gives me "Application failed to respond" with a 503 in the console. If anyo...

Railway also requires a PORT environment variable to be set. This is specific to Railway.

I've also recorded a railway deployment tutorial a while back here: https://www.youtube.com/watch?v=0XmQE03y5Ek 🙂

This is an extensive introduction to deploying Payload CMS. It explains how to deploy Payload CMS step-by-step on either Northflank or Railway. The concepts (environment variables etc.) are universally applicable. After seeing how the deployment works on both services, you should know how to deploy it anywhere.

Dockerfile:

FROM node:18.8.0-alp...

▶ Play video