File tree Expand file tree Collapse file tree 1 file changed +9
-21
lines changed Expand file tree Collapse file tree 1 file changed +9
-21
lines changed Original file line number Diff line number Diff line change 1-
21# Builder Stage
32FROM node:22-alpine AS builder
43
@@ -31,32 +30,21 @@ FROM node:22-alpine
3130
3231WORKDIR /app
3332
34- # Environnement variables
33+ # Environment variables
3534ENV NODE_ENV=production \
3635 HOST=0.0.0.0 \
37- PORT=3000
38-
39- # install tools
40- RUN npm install -g pnpm npm-run-all && \
41- apk add --no-cache git && \
42- git init
36+ PORT=3000 \
37+ VITE_PORT=3000
4338
44- # copy files needed for installing dependencies
45- COPY --from=builder /app/package.json ./
46- COPY --from=builder /app/pnpm-lock.yaml ./
47- COPY --from=builder /app/run-jiti.js ./
48- COPY --from=builder /app/prisma ./prisma
49- COPY --from=builder /app/src/features/build-info ./src/features/build-info
50-
51- # copy environment configuration
52- # TODO: Replace with environment variables or secrets in production
39+ # install pnpm
40+ RUN npm install -g pnpm npm-run-all
5341COPY .env ./
5442
55- # install production dependencies (this will run prisma generate)
56- RUN pnpm install --frozen-lockfile
57-
58- # copy build artifacts after installation
43+ # # copy output build and package.json from builder
5944COPY --from=builder /app/.output ./.output
45+ COPY --from=builder /app/package.json ./package.json
46+ COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
47+ COPY --from=builder /app/node_modules ./node_modules
6048
6149EXPOSE 3000
6250
You can’t perform that action at this time.
0 commit comments