This repository was archived by the owner on May 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .github
3
+ .git
4
+ dist
5
+ .gitignore
6
+ * .md
7
+ LICENSE
Original file line number Diff line number Diff line change
1
+ # Indicate that we want to use node 14.7.0 alpine.
2
+ # ? Alpine is simply a lighter image, although it is not as comprehensive as the normal image
3
+ FROM node:14.7-alpine
4
+
5
+
6
+ # Copy the package.json and yarn.lock files to the /tmp directory, in order to install dependencies
7
+ # ? This is done to improve
8
+ COPY package.json /tmp
9
+ COPY yarn.lock /tmp
10
+
11
+ # Change into the /tmp directory
12
+ WORKDIR /tmp
13
+
14
+ # Install all the dependencies
15
+ RUN yarn
16
+
17
+ # Make the directory the backend will reside in and copy the node modules into it
18
+ RUN mkdir -p /app && cp -a /tmp/node_modules /app/ && cp package.json /app
19
+
20
+ # Change to the directory and add the backend's source files
21
+ WORKDIR /app
22
+ COPY . .
23
+
24
+ RUN yarn run build
25
+
26
+ RUN rm -r ./src
27
+
28
+ EXPOSE 80
29
+ EXPOSE 443
30
+
31
+ # Start the backend in production mode
32
+ CMD [ "yarn" , "start" ]
Original file line number Diff line number Diff line change
1
+ version : " 3.8"
2
+
3
+ services :
4
+ backend :
5
+ build :
6
+ context : " ."
7
+ dockerfile : " ./Dockerfile"
8
+ ports :
9
+ - " 80:80"
10
+ - " 443:443"
11
+
12
+ env_file :
13
+ - .env
You can’t perform that action at this time.
0 commit comments