Skip to content

Commit eb66904

Browse files
committed
chore: enhance Dockerfile with dumb-init for signal handling and improve artifact copying
1 parent 4dca4c7 commit eb66904

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Dockerfile.railwayapp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ RUN npm run build
2929

3030
FROM node:24-alpine
3131

32+
# Install dumb-init for proper signal handling
33+
RUN apk add --no-cache dumb-init
34+
3235
ARG PORT
3336
ARG PGHOST
3437
ARG PGPORT
@@ -69,12 +72,19 @@ LABEL org.opencontainers.image.licenses=MIT
6972

7073
WORKDIR /app
7174

75+
# Copy runtime artifacts and configuration
7276
COPY --from=build /build/dist .
77+
COPY --from=build /build/package.json /build/package-lock.json ./
78+
COPY --from=build /build/knexfile.js ./
79+
COPY --from=build /build/migrations ./migrations
80+
COPY --from=build /build/seeds ./seeds
7381

74-
RUN npm install --omit=dev --quiet
82+
RUN npm install --omit=dev --quiet && npm install -g knex@2.4.0
7583

7684
USER 1000:1000
7785

7886
RUN mkdir -p $NOSTR_CONFIG_DIR
7987

88+
ENTRYPOINT ["dumb-init", "--"]
89+
8090
CMD ["sh", "-c", "npm run db:migrate && node src/index.js"]

0 commit comments

Comments
 (0)