File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,39 @@ WORKDIR /app
1111
1212COPY package*.json pnpm-lock.yaml tsconfig.json tsup.config.ts ./
1313
14+ RUN pnpm install --frozen-lockfile
15+
1416COPY src ./src
1517
1618RUN pnpm approve-builds @swc/core esbuild lz4
1719
20+ RUN pnpm build
21+
22+ RUN pnpm prune --prod
23+
24+ # Runtime stage
25+ FROM base
26+
27+ # Install runtime dependencies for native modules
28+ RUN apk add --no-cache libc6-compat
29+
30+ WORKDIR /app
31+
32+ # Copy package files first
33+ COPY --from=builder /app/package.json ./package.json
34+ COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
35+
36+ RUN pnpm approve-builds lz4
37+
1838RUN pnpm install --prod --frozen-lockfile && \
19- pnpm build && \
20- pnpm prune --prod
39+ pnpm rebuild
2140
22- COPY entrypoint.sh /entrypoint.sh
41+ COPY --from=builder /app/dist ./dist
2342
43+ COPY entrypoint.sh /entrypoint.sh
2444RUN chmod +x /entrypoint.sh
2545
2646EXPOSE 3000
2747
2848ENTRYPOINT ["/entrypoint.sh" ]
29- CMD ["/bin/sh" , "-c" , "NODE_ENV=production PORT=3000 CONFIG_FILE=/config/env.yml CONTEXT_FILE=/config/context.md node dist/main.js" ]
49+ CMD ["/bin/sh" , "-c" , "NODE_ENV=production PORT=3000 CONFIG_FILE=/config/env.yml CONTEXT_FILE=/config/context.md node dist/main.js" ]
You can’t perform that action at this time.
0 commit comments