We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 32b3432 + af9de3c commit 94b4ce9Copy full SHA for 94b4ce9
2 files changed
Dockerfile
@@ -0,0 +1,20 @@
1
+FROM node:13.12.0-alpine
2
+
3
+# set working directory
4
+WORKDIR /app
5
6
+# add `/app/node_modules/.bin` to $PATH
7
+ENV PATH /app/node_modules/.bin:$PATH
8
9
+# install app dependencies
10
+COPY package.json ./
11
+COPY package-lock.json ./
12
+RUN npm install --silent
13
+RUN npm install
14
+#react-scripts@3.4.1 -g --silent
15
16
+# add app
17
+COPY . ./
18
19
+# start app
20
+CMD ["npm", "start"]
docker-compose.yaml
@@ -0,0 +1,16 @@
+version: '3.7'
+services:
+ sample:
+ container_name: portfolio
+ build:
+ context: .
+ dockerfile: Dockerfile
+ volumes:
+ - '.:/app'
+ - '/app/node_modules'
+ ports:
+ - 3001:3000
+ # environment:
+ # - CHOKIDAR_USEPOLLING=true
0 commit comments