forked from giuem/uptimerobot-page
-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 638 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (20 loc) · 638 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
FROM node:20.13.1-alpine AS BUILDER
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install && yarn cache clean
COPY . .
RUN yarn build
FROM node:20.13.1-alpine
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV NODE_ENV=production
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install && yarn cache clean
COPY --from=BUILDER /app/build ./build
COPY --from=BUILDER /app/frontend/dist ./frontend/dist
COPY config ./config
RUN yarn install && yarn cache clean && ls config
# To ensure build success when .env is not exist.
COPY .env* ./
CMD ["node", "build/bootstrap"]