forked from giuem/uptimerobot-page
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 583 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 583 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
FROM node:16.13.1-alpine AS BUILDER
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install && yarn cache clean
COPY . .
RUN yarn build
FROM node:16.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 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"]