-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
167 lines (167 loc) · 4.07 KB
/
docker-compose.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: '3.8'
services:
cambio-db:
image: mysql:latest
container_name: cambio-db
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
TZ: America/Cuiaba
MYSQL_ROOT_PASSWORD: admin123
MYSQL_USER: docker
MYSQL_PASSWORD: admin123
MYSQL_DATABASE: cambio_db
MYSQL_ROOT_HOST: '%'
MYSQL_TCP_PORT: 3306
ports:
- '3311:3306'
expose:
- 3311
stdin_open: true
tty: true
volumes:
- .docker/cambio_db:/var/lib/mysql
- .docker/init_cambio_db.sql:/docker-entrypoint-initdb.d/init.sql
restart: on-failure
networks:
- microservice-network
book-db:
image: mysql:latest
container_name: book-db
command: mysqld --default-authentication-plugin=mysql_native_password
environment:
TZ: America/Cuiaba
MYSQL_ROOT_PASSWORD: admin123
MYSQL_USER: docker
MYSQL_PASSWORD: admin123
MYSQL_DATABASE: book_db
MYSQL_ROOT_HOST: '%'
MYSQL_TCP_PORT: 3306
ports:
- '3310:3306'
expose:
- 3310
stdin_open: true
tty: true
volumes:
- .docker/book_db:/var/lib/mysql
- .docker/init_book_db.sql:/docker-entrypoint-initdb.d/init.sql
restart: on-failure
networks:
- microservice-network
zipkin-server:
image: openzipkin/zipkin:2.23.2
container_name: zipkin
ports:
- '9411:9411'
environment:
RABBIT_URI: amqp://guest:guest@rabbit-mq:5672
depends_on:
- rabbit-mq
restart: on-failure
networks:
- microservice-network
rabbit-mq:
image: rabbitmq:3.8.14-management
container_name: rabbitmq
ports:
- '5672:5672'
- '15672:15672'
networks:
- microservice-network
naming-server:
image: da0hn/naming-server:1.0.0
container_name: naming-server
environment:
- PORT=8761
ports:
- '8761:8761'
networks:
- microservice-network
api-gateway:
image: da0hn/api-gateway:1.1.0
container_name: api-gateway
environment:
- PORT=8765
- ZIPKIN_URL=zipkin-server
- ZIPKIN_PORT=9411
- ZIPKIN_SENDER_TYPE=rabbit
- EUREKA_URL=naming-server
- EUREKA_PORT=8761
- RABBITMQ_HOST=rabbit-mq
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_PORT=5672
ports:
- '8765:8765'
depends_on:
- naming-server
- zipkin-server
- rabbit-mq
networks:
- microservice-network
book-service:
image: da0hn/book-service:1.1.0
container_name: book-service
build:
context: ./book-service
restart: on-failure
ports:
- '8100:8100'
environment:
- TZ=America/Cuiaba
- DATABASE_URL=book-db
- DATABASE_PORT=3306
- DATABASE=book_db
- DATABASE_USER=root
- DATABASE_PASSWORD=admin123
- PORT=8100
- ZIPKIN_URL=zipkin-server
- ZIPKIN_PORT=9411
- ZIPKIN_SENDER_TYPE=rabbit
- EUREKA_URL=naming-server
- EUREKA_PORT=8761
- RABBITMQ_HOST=rabbit-mq
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_PORT=5672
depends_on:
- naming-server
- book-db
- rabbit-mq
networks:
- microservice-network
cambio-service:
image: da0hn/cambio-service:1.1.0
container_name: cambio-service
build:
context: ./cambio-service
restart: on-failure
ports:
- '8000:8000'
environment:
- TZ=America/Cuiaba
- DATABASE_URL=cambio-db
- DATABASE_PORT=3306
- DATABASE=cambio_db
- DATABASE_USER=root
- DATABASE_PASSWORD=admin123
- PORT=8000
- ZIPKIN_URL=zipkin-server
- ZIPKIN_PORT=9411
- ZIPKIN_SENDER_TYPE=rabbit
- EUREKA_URL=naming-server
- EUREKA_PORT=8761
- RABBITMQ_HOST=rabbit-mq
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- RABBITMQ_PORT=5672
depends_on:
- naming-server
- cambio-db
- rabbit-mq
networks:
- microservice-network
networks:
microservice-network:
driver: bridge
name: microservice-network