-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (24 loc) · 877 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
35
36
FROM node:14-alpine AS builder
WORKDIR /root/slack-archive/source
COPY package.json yarn.lock ./
COPY apps/server/package.json ./apps/server/
COPY apps/web/package.json ./apps/web/
COPY libs/common/package.json ./libs/common/
RUN yarn
COPY . .
RUN yarn run:web build
RUN mkdir -p /root/slack-archive/build/apps
RUN mkdir -p /root/slack-archive/build/libs
RUN mv yarn.lock package.json /root/slack-archive/build/
RUN mv apps/server /root/slack-archive/build/apps/
RUN mv libs/common /root/slack-archive/build/libs/
RUN mv apps/web/dist /root/slack-archive/build/apps/server/public
WORKDIR /root/slack-archive/build
RUN yarn install --production
FROM node:14-alpine
COPY --from=builder /root/slack-archive/build /root/slack-archive/
WORKDIR /root/slack-archive/apps/server
ENV STATIC_WEB_DIR=./public
ENV PORT=80
EXPOSE 80
CMD yarn db:migration:run && yarn start:prod