-
Notifications
You must be signed in to change notification settings - Fork 147
/
docker-compose.yaml
97 lines (94 loc) · 1.67 KB
/
docker-compose.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3.9"
networks:
roboshop:
driver: bridge
volumes:
# This is equivalent to docker volume create [volume-name]. these are named volumes
mysql:
driver: local
driver_opts:
o: bind
type: none
device: /home/ec2-user/mysql
redis:
driver: local
driver_opts:
o: bind
type: none
device: /home/ec2-user/redis
rabbitmq:
driver: local
driver_opts:
o: bind
type: none
device: /home/ec2-user/rabbitmq
mongodb:
driver: local
driver_opts:
o: bind
type: none
device: /home/ec2-user/mongodb
services:
web:
image: web:v1
container_name: web
ports:
- "80:80"
depends_on:
- catalogue
- user
- cart
- mysql
- shipping
mongodb:
image: mongodb:v1
container_name: mongodb
volumes:
- mongodb:/data/db
catalogue:
image: catalogue:v1
container_name: catalogue
depends_on:
- mongodb
redis:
image: redis
container_name: redis
volumes:
- redis:/data
user:
image: user:v1
container_name: user
depends_on:
- mongodb
- redis
cart:
image: cart:v1
container_name: cart
depends_on:
- redis
- catalogue
mysql:
image: mysql:v1
container_name: mysql
volumes:
- mysql:/var/lib/mysql
shipping:
image: shipping:v1
container_name: shipping
depends_on:
- mysql
rabbitmq:
image: rabbitmq
container_name: rabbitmq
volumes:
- rabbitmq:/var/lib/rabbitmq
payment:
image: payment:v1
container_name: payment
depends_on:
- rabbitmq
ratings:
image: ratings:v1
container_name: ratings
depends_on:
- mysql