forked from atlassian-archive/landkid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (20 loc) · 759 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (20 loc) · 759 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
27
28
29
30
31
32
FROM node:12.22.6-buster-slim
WORKDIR /opt/service
# update all OS dependencies to prevent vuln's
RUN apt-get update && apt-get -y upgrade
# Copy PJ, changes should invalidate entire image
COPY package.json yarn.lock /opt/service/
# Copy commong typings
COPY typings /opt/service/typings
# Copy TS configs
COPY tsconfig* /opt/service/
# Build backend
COPY src /opt/service/src
# Build Frontend
COPY webpack.*.js README.md /opt/service/
COPY tools /opt/service/tools
# Install dependencies
RUN yarn --cache-folder ../ycach && NODE_ENV=production yarn build && yarn --production --cache-folder ../ycache && rm -rf ../ycache && rm -rf src && rm -rf tools && rm -rf typings
ENV NODE_ENV=production
EXPOSE 8080
ENTRYPOINT ["npm", "run", "start", "--"]