2 years ago
This cron runs regularly (every 15 minutes I think) and mostly works fine, but in the last few days I've had 3 (I think) build failures, that just says the start command is invalid.
ⓘ Deployment information is only viewable by project members and Railway employees.
13 Replies
2 years ago
Please provide full build logs -
2 years ago
The 2 most recent ones, the build logs are just this
June 22 10:40
=========================
Container failed to start
=========================
We failed to create a container for this image.
Potential reasons for this happening are:
The start command is invalid.
Start command: `npm run cron`
June 19 20:40
=========================
Container failed to start
=========================
We failed to create a container for this image.
Potential reasons for this happening are:
The start command is invalid.
Start command: `npm run cron`
2 years ago
no, the note there says "Opt-in only if you need access to private network during builds" and I dont think I do. It also says it will be slower. Is it worth trying anyway?
2 years ago
Where does it say it will be slower?
I don't think you are talking about the new builder, scroll down some more and look for the correct setting.
2 years ago
done - first build completed ok, will wait and see if it still fails occasionally
2 years ago
hmm with the new builder, the deploy crashes, turned off the new builder and it works again
Error: Cannot find module '/usr/src/app/npm run cron'
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.14.02 years ago
yeh, npm run cron
2 years ago
yeh:
# syntax=docker/dockerfile:1
ARG NODE_VERSION=20
FROM node:${NODE_VERSION}-alpine
# Use production node environment by default.
ENV NODE_ENV production
WORKDIR /usr/src/app
# Copy the rest of the source files into the image.
COPY . .
RUN npm ci --omit=dev
ARG PG_VERSION='16'
RUN apk add --update --no-cache postgresql${PG_VERSION}-client
RUN apk add --no-cache gnupg
# Expose the port that the application listens on.
EXPOSE 3000