-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (29 loc) · 814 Bytes
/
Dockerfile
File metadata and controls
39 lines (29 loc) · 814 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
33
34
35
36
37
38
39
###########################################
# build
###########################################
ARG NODE_VERSION=14.15.4
FROM node:${NODE_VERSION} as dev
WORKDIR /app
COPY . .
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package.json /app/package.json
RUN npm ci
# Our app will run on port 4000
EXPOSE 4000
ENV ENV=development
###########################################
# package up only the app
###########################################
FROM node:${NODE_VERSION}
WORKDIR /app
COPY . .
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY --from=dev /app/ .
# Our app will run on port 4000
EXPOSE 4000
# Start an apollo server at port 3000
CMD ["./start.sh"]