-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
111 lines (102 loc) · 2.27 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3'
services:
api:
depends_on:
- database
- eureka-server
- rabbit-mq
container_name: clothes-shop-api
restart: always
build:
context: ./clothes-shop-api
dockerfile: Dockerfile
volumes:
- ./clothes-shop-api:/usr/src/clothes-shop-api
ports:
- "5000:5000"
shops-api:
depends_on:
- database
- eureka-server
- rabbit-mq
container_name: shops-api
restart: always
build:
context: ./shops-api
dockerfile: Dockerfile
volumes:
- ./shops-api:/usr/src/shops-api
ports:
- "5100:5100"
database:
container_name: database
restart: always
build:
context: ./docker
dockerfile: mysql.Dockerfile
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: shop
ports:
- "20000:3306"
eureka-server:
container_name: eureka-server
restart: always
build:
context: ./clothes_shop_eureka_server
dockerfile: Dockerfile
volumes:
- ./clothes_shop_eureka_server:/usr/src/clothes_shop_eureka_server
ports:
- "8761:8761"
# client:
# depends_on:
# - eureka-server
# - database
# - api
# container_name: client
# restart: always
# build:
# context: ./clothes_shop_discovery_client
# dockerfile: Dockerfile
# volumes:
# - ./clothes_shop_discovery_client:/usr/src/clothes_shop_discovery_client
# ports:
# - "4000:4000"
rabbit-mq:
image: rabbitmq:3.8.0-beta.3-management
hostname: rabbit-mq
container_name: rabbit-mq
environment:
RABBITMQ_ERLANG_COOKIE: root
RABBITMQ_NODENAME: rabbit@rabbit-mq
ports:
- "15673:15672"
config-server:
container_name: config-server
depends_on:
- rabbit-mq
restart: always
build:
context: ./config-server
dockerfile: Dockerfile
volumes:
- ./config-server:/usr/src/config-server
ports:
- "8888:8888"
consumer:
depends_on:
- database
- rabbit-mq
container_name: consumer
build:
context: ./shop-consumer
dockerfile: Dockerfile
volumes:
- ./shop-consumer:/usr/src/shop-consumer
ports:
- "11000:11000"
volumes:
db_data: