10 months ago
Hi I have a turbo monorepo with a Next app I am trying to deploy. The app builds and deploys fine but i cant access the site at the url.
In the logs im not sure if its related but I can see an:
ELIFECYCLE Command failed.
The app works fine on vercel, not sure if i need to make changes to get it to work on railway.
2 Replies
it seems to dectect next server running at port 3000 when i click generate domain but then i get, application failed to respond when i click into it
site:start: ✓ Ready in 400ms
container event container died
ELIFECYCLE Command failed.
site:start: ELIFECYCLE Command failed.
ERROR run failed: command exited (1)
10 months ago
Suggest you to follow this template as reference for config
https://github.com/railwayapp-templates/nextjs-prisma/tree/main
Also, remember to set the defined build and start commands on service settings, as usual next deault package comes with different command names.
10 months ago
Pay attention to the start command at the example. The PORT env variable interpolation.
10 months ago
are you in the root of the project when you run these commands?
10 months ago
please send your deployment logs -
FYI those invalid next config options are not the cause of any issues since they come up when its working
10 months ago
I'm not seeing any errors in those logs, what's not working?
10 months ago
can you try setting a HOSTNAME
variable to 0.0.0.0
10 months ago
deployment logs please
10 months ago
send your next.config.js file
const { withPayload } = require('@payloadcms/next/withPayload')
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// images: {
// domains: [
// "res.cloudinary.com",
// "images.pexels.com",
// "placeimg.com",
// "placehold.co",
// "via.placeholder.com",
// "nursify.vercel.app",
// ],
// },
images: {
remotePatterns: [
{
protocol: "https",
hostname: "", }, { protocol: "http", hostname: "",
},
],
},
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
};
module.exports = withPayload(nextConfig);
10 months ago
can you add -H 0.0.0.0
into your start command
10 months ago
show me your public networking section of the settings
that last change might have been it, just might have needed time to update
10 months ago
no problem!