Can't deploy my app front
zohard
HOBBYOP

22 days ago

RUN npm run build completes successfully every time — visible ✨ Build complete! in the logs — but the build then goes completely silent afterward. No error, no further output, nothing. The deployment is eventually marked "Deploy failed" externally, with zero diagnostic information ever written to the build log explaining why.

  • 22:27:54.912Z — ✨ Build complete! logged (build genuinely finished)
  • 22:51:21.217Z — uploading snapshot logged — 23m26s later, with zero output in between
  • No further log lines after that at all
  • Deployment marked "Deploy failed" after 30 40min

I don't have much info try some change on my Dockerfile for muti stage suggest by the assistant without result

Solved$10 Bounty

4 Replies

Railway
BOT

22 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 22 days ago


What does your Dockerfile look like? Do you have a CMD at the end as your start command?


0x5b62656e5d

What does your Dockerfile look like? Do you have a `CMD` at the end as your start command?

zohard
HOBBYOP

22 days ago

Dockerfile for Railway - Nuxt.js SSR deployment

FROM node:20-alpine

Install build dependencies

RUN apk add --no-cache python3 make g++

Set working directory

WORKDIR /app

Set Node.js memory limit to 4GB for Nuxt build

ENV NODE_OPTIONS="--max-old-space-size=4096"

Ensure Nitro listens on all interfaces (Railway requirement)

ENV NITRO_HOST=0.0.0.0

Copy package files

COPY package*.json ./

Install dependencies

RUN npm ci

Copy all source code

COPY . .

Accept build arguments from Railway

ARG API_BASE_URL

ARG SITE_URL

Set environment variables for the build

Build the Nuxt app for production (now with env vars available)

RUN npm run build

Explicitly copy large game assets to output (Nitro may skip large binary dirs)

RUN mkdir -p .output/public/images/assetpack && \

cp -r public/images/assetpack/. .output/public/images/assetpack/

Expose port (Railway will set PORT env var)

EXPOSE 3000

Start the production server with debugging

CMD echo "🔌 PORT from env: $PORT" && \

echo "🔌 NITRO_HOST: ${NITRO_HOST:-0.0.0.0}" && \

echo "🚀 Starting Nuxt server..." && \

node .output/server/index.mjs

Try using CMD ["node", ".output/server/index.mjs"] instead of what you currently have.


0x5b62656e5d

Try using `CMD ["node", ".output/server/index.mjs"]` instead of what you currently have.

zohard
HOBBYOP

22 days ago

right now it's still running, 10min right now so i sure it will go until failed in build logs


RUN npm ci cached

0ms

COPY package*.json ./ cached

0ms

WORKDIR /app cached

0ms

RUN apk add --no-cache python3 make g++ cached

0ms

COPY . .

1s

RUN npm run build

11m 31s

└ ✨ Build complete!


[@nuxt/image] ℹ sharp binaries have been included in your build for linux-x64. Make sure you deploy to the same architecture.

[nitro] ✔ You can preview this build using node .output/server/index.mjs

└ ✨ Build complete!

uploading snapshot 175.7 MB


Status changed to Solved zohard 22 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...