-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (44 loc) · 907 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (44 loc) · 907 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
40
41
42
43
44
45
46
47
48
version: '3.3'
services:
# Mongo
bookstore_mongo:
image: mongo
container_name: bookstore_mongo
networks:
bookstore:
aliases:
- bookstore_mongo
ports:
- 27017:27017
# Back-end
backend_bookstore:
build:
context: ./back-end
image: bookstore-backend:10
networks:
- bookstore
volumes:
- ./back-end:/back-end
depends_on:
- bookstore_mongo
ports:
- 3000:3000
env_file: back-end/app.env
container_name: bookstore_backend
restart: always
command: sh -c "/wait-for bookstore_mongo:27017 -t 0 && npm start"
# Back-end
frontend_bookstore:
build:
context: ./front-end
image: bookstore:1.0
networks:
- bookstore
depends_on:
- bookstore_mongo
- backend_bookstore
ports:
- 8000:80
container_name: bookstore_frontend
networks:
bookstore: