forked from nusmodifications/nusmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
31 lines (22 loc) · 857 Bytes
/
Dockerfile.prod
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
FROM node:10-alpine
RUN apk update && \
apk add --no-cache git python build-base && \
mkdir -p /home/node/app
WORKDIR /home/node/app/website
# multiple copy statements because we want to cache
# from least likely to most likely to change
COPY ./website/static/ ./static/
COPY ./website/webpack/ ./webpack/
COPY ./website/scripts/ ./scripts/
COPY ./packages/ /home/node/app/packages/
COPY ./website/.postcssrc.js ./website/babel.config.js ./website/tsconfig.json ./
COPY ./website/package.json ./website/yarn.lock ./
RUN ls -la1; yarn --no-cache --frozen-lockfile
COPY ./website/src/ ./src
ARG DATA_API_BASE_URL
ARG GIT_COMMIT_HASH
RUN yarn build
FROM abiosoft/caddy:no-stats
COPY --from=0 /home/node/app/website/dist /srv/dist
COPY --from=0 /home/node/app/website/dist-timetable /srv/dist-timetable
COPY ./website/Caddyfile /etc/Caddyfile