Commit da1d815 1 parent 098da80 commit da1d815 Copy full SHA for da1d815
File tree 1 file changed +19
-10
lines changed
1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change 1
- # Stage 1: Build stage
2
- FROM node:18.20-alpine AS builder
1
+ ARG NODE_VERSION=22.7
3
2
4
- WORKDIR /app
3
+ # Build stage
4
+ FROM node:${NODE_VERSION}-slim AS build
5
+
6
+ WORKDIR /build-space
7
+
8
+ COPY ./package.json /build-space/
9
+ COPY ./yarn.lock /build-space/
5
10
6
- COPY package.json yarn.lock ./
7
11
RUN yarn install
8
12
9
- COPY . .
13
+ COPY . ./
10
14
11
- # Stage 2: Production stage
12
- FROM node:18.20-alpine
15
+ RUN yarn build
13
16
17
+ # Production stage
18
+ FROM node:${NODE_VERSION}-alpine
14
19
WORKDIR /app
15
20
16
- COPY --from=builder /app /app
21
+ COPY --from=build /build-space/.output ./
22
+
23
+ ENV HOST=0.0.0.0
24
+ ENV NODE_ENV=production
25
+ ENV PORT=80
17
26
18
- EXPOSE 3001
27
+ EXPOSE 80
19
28
20
- CMD ["sh ", "-c", "yarn migration:apply && yarn dev "]
29
+ CMD ["node ", "/app/server/index.mjs "]
You can’t perform that action at this time.
0 commit comments