-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (20 loc) · 639 Bytes
/
Dockerfile
File metadata and controls
35 lines (20 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Stage 1: Build Stage
FROM node:22-alpine AS build
WORKDIR /app
ENV NODE_ENV=production
# Copy package files first for better layer caching
COPY pnpm-lock.yaml package.json ./
COPY . .
RUN npm install -g corepack@latest
RUN corepack enable
RUN pnpm install
RUN pnpm run build
# Stage 2: Final Stage
FROM node:22-alpine AS final
WORKDIR /app
COPY --from=build /app/.output .output
RUN apk update && apk upgrade && apk add --no-cache curl
EXPOSE 3000
CMD ["sh", "-c", "export NUXT_PRIVATE_RESEND_API_KEY=$NUXT_PRIVATE_RESEND_API_KEY && \
export NUXT_PRIVATE_EMAIL=\"$NUXT_PRIVATE_EMAIL\" && \
node .output/server/index.mjs"]