forked from creatorsdaily/client.creatorsdaily.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (32 loc) · 833 Bytes
/
Dockerfile
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
FROM node:12.0.0 as base
WORKDIR /app
COPY package.json ./package.json
COPY yarn.lock ./
RUN yarn --production
FROM base as builder
ARG API
ARG GRAPHQL
ARG UPLOAD
ARG FILES
ARG NAME
ARG SLOGAN
ARG DESCRIPTION
ARG KEYWORDS
ARG ONE_SIGNAL_APP_ID
ARG PRODUCT_ID
ARG DOMAIN
ARG GRAPHQL_WS
ARG CLOSE_TIP
ENV API=$API GRAPHQL=$GRAPHQL UPLOAD=$UPLOAD FILES=$FILES NAME=$NAME SLOGAN=$SLOGAN DESCRIPTION=$DESCRIPTION KEYWORDS=$KEYWORDS ONE_SIGNAL_APP_ID=$ONE_SIGNAL_APP_ID PRODUCT_ID=$PRODUCT_ID DOMAIN=$DOMAIN GRAPHQL_WS=$GRAPHQL_WS CLOSE_TIP=$CLOSE_TIP
WORKDIR /app
RUN yarn
COPY . .
RUN yarn build
FROM base
WORKDIR /app
COPY . .
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public/service-worker.js ./public/service-worker.js
EXPOSE 3000
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
CMD ["yarn", "start"]