NestJS crashing in run time

tahadk
PRO

10 months ago

NestJS crashing in run time and restart without clean error

Project: 694a1186-3c22-49fe-a25d-eacbfc6592d8
Service: e3448011-a9df-48d9-a14e-d6146ce9e49f

Custom docker:

FROM node:16.20.2 As installation
WORKDIR /src
COPY package.json yarn.lock tsconfig.build.json ./
RUN yarn install --frozen-lockfile

FROM node:16.20.2 As build
WORKDIR /src
COPY --from=installation /src/nodemodules ./nodemodules
ENV NODEENV production COPY . . RUN yarn api-admin:build && \ yarn cache clean --force && \ curl -sf https://gobinaries.com/tj/node-prune | bash && \ node-prune /src/nodemodules

FROM node:16.20.2 As production
WORKDIR /src
COPY --from=build /src/nodemodules ./nodemodules
COPY --from=installation /src/nodemodules/adminjs/lib/frontend/assets ./nodemodules/adminjs/lib/frontend/assets
COPY --from=build /src/dist ./dist
COPY ./assets ./assets
RUN mkdir -p ./apps/api-admin/src/uploads/

CMD ["node", "dist/apps/api-admin/apps/api-admin/src/main.js"]

EXPOSE 5000

View Deploy details

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

1 Replies

10 months ago

You are likely running out of memory, please upgrade to the Hobby plan for across to 8GB of memory and then redeploy.


NestJS crashing in run time - Railway Help Station