File tree Expand file tree Collapse file tree 4 files changed +47
-1
lines changed Expand file tree Collapse file tree 4 files changed +47
-1
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ .dockerignore
3
+ Dockerfile-dev
Original file line number Diff line number Diff line change
1
+ FROM node:latest
2
+
3
+ # set working directory
4
+ RUN mkdir /usr/src/app
5
+ WORKDIR /usr/src/app
6
+
7
+ # install and cache app dependencies
8
+ ADD package.json /usr/src/app/package.json
9
+ RUN npm install
10
+
11
+ # add `/usr/src/app/node_modules/.bin` to $PATH
12
+ ENV PATH /usr/src/app/node_modules/.bin:$PATH
13
+
14
+ # add app
15
+ COPY . /usr/src/app
Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ Book-detail page for Admin user:
431
431
Check out [ package.json] ( https://github.com/builderbook/builderbook/blob/master/package.json ) .
432
432
433
433
## Docker
434
- - Install Docker (Ubuntu instructions: https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04 )
434
+ - Install Docker and Docker Compose
435
435
- Modify ` docker-compose-dev.yml ` file
436
436
- If using Ubuntu, follow these steps: https://stackoverflow.com/questions/38775954/sudo-docker-compose-command-not-found
437
437
- Start app with ` docker-compose -f docker-compose-dev.yml up `
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+ app-db-dev :
5
+ image : mongo:latest
6
+ container_name : app-db-dev
7
+ ports :
8
+ - " 27017:27017"
9
+ expose :
10
+ - " 27017"
11
+
12
+ app-service-dev :
13
+ container_name : app-service-dev
14
+ build :
15
+ context : ./
16
+ dockerfile : Dockerfile-dev
17
+ command : npm run dev
18
+ depends_on :
19
+ - app-db-dev
20
+ volumes :
21
+ - " ./:/usr/src/app"
22
+ - " ./package.json:/usr/src/package.json"
23
+ ports :
24
+ - " 8000:8000"
25
+ environment :
26
+ MONGO_URL : " mongodb://app-db-dev:27017/SampleDB"
27
+ MONGO_URL_TEST : " mongodb://app-db-dev:27017/SampleDB"
28
+ SESSION_SECRET : " xxxxxxx"
You can’t perform that action at this time.
0 commit comments