forked from gsainfoteam/bbun-finder-be
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (21 loc) · 664 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (21 loc) · 664 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
#Step 1: Build the app in image 'builder'
FROM node:24-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN apk update && \
apk add build-base libheif vips-dev vips -q
RUN npm install --platform=linuxmusl
COPY . .
RUN npx prisma generate
RUN npm run build
#Step 2: Copy the build from 'builder' to 'runner'
FROM node:24-alpine
WORKDIR /app
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apk update && \
apk add build-base libheif vips-dev vips -q
COPY --from=builder /app ./
RUN npm install -D prisma --platform=linuxmusl
EXPOSE 3000
CMD ["npm", "run", "start:deploy"]