-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (27 loc) · 814 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
# If you want to create a docker image of the current version, you must do a yarn build beforehand and build the docker file.
# Builder
FROM node:14.17.1-alpine3.13 as builder
ENV NODE_ENV build
WORKDIR /app
COPY . /app
RUN yarn \
&& yarn build
### BASE
FROM node:14.17.1-alpine3.13 AS base
LABEL maintainer "Cute_Wisp <[email protected]>"
# Set the working directory
WORKDIR /app
# Copy project specification and dependencies lock files
COPY package.json yarn.lock tsconfig.json /tmp/
### RELEASE
FROM base AS development
# Copy app sources
COPY --from=builder /app/dist/ ./dist
COPY ./tsconfig.json .
COPY ./package.json .
COPY ./tsconfig-paths-bootstrap.js .
# Copy dependencies
COPY --from=builder /app/node_modules ./node_modules
# Expose application port
EXPOSE 8000
CMD ["yarn", "start:prod"]