Skip to content

Commit ab86408

Browse files
Update Dockerfile.railwayapp
1 parent 48a2c61 commit ab86408

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

Dockerfile.railwayapp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
## Author Saransh Sharma @cynsar foundation
2-
ARG PNPM_VERSION=10.33.0
3-
42
FROM node:24-alpine as build
53

6-
ARG PNPM_VERSION
74
ARG PORT
85
ARG PGHOST
96
ARG PGPORT
@@ -20,22 +17,21 @@ ENV DB_NAME=$PGDATABASE
2017
ENV DB_USER=$PGUSER
2118
ENV DB_PASSWORD=$PGPASSWORD
2219

23-
COPY ["package.json", "pnpm-lock.yaml","knexfile.js","./"]
20+
COPY ["package.json", "package-lock.json","knexfile.js","./"]
2421

2522
ADD migrations /build/migrations
2623

27-
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --frozen-lockfile --silent
24+
RUN npm install -g knex@2.4.0 && npm install --quiet
2825

2926
COPY . .
3027

31-
RUN pnpm build
28+
RUN npm run build
3229

3330
FROM node:24-alpine
3431

3532
# Install dumb-init for proper signal handling
3633
RUN apk add --no-cache dumb-init
3734

38-
ARG PNPM_VERSION
3935
ARG PORT
4036
ARG PGHOST
4137
ARG PGPORT
@@ -78,18 +74,17 @@ WORKDIR /app
7874

7975
# Copy runtime artifacts and configuration
8076
COPY --from=build /build/dist .
81-
COPY --from=build /build/package.json /build/pnpm-lock.yaml ./
77+
COPY --from=build /build/package.json /build/package-lock.json ./
8278
COPY --from=build /build/knexfile.js ./
8379
COPY --from=build /build/migrations ./migrations
8480
COPY --from=build /build/seeds ./seeds
8581

86-
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --prod --frozen-lockfile --silent
82+
RUN npm install --omit=dev --quiet && npm install -g knex@2.4.0
8783

8884
USER 1000:1000
8985

9086
RUN mkdir -p $NOSTR_CONFIG_DIR
9187

9288
ENTRYPOINT ["dumb-init", "--"]
9389

94-
CMD ["sh", "-c", "pnpm db:migrate && node src/index.js"]
95-
90+
CMD ["sh", "-c", "npm run db:migrate && node src/index.js"]

0 commit comments

Comments
 (0)