-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
148 lines (139 loc) · 3.81 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
version: '3.4'
services:
rabbit-mq:
image: rabbitmq:3.8.14-management
restart: always
ports:
- 5672:5672
- 15672:15672
networks:
- sc-network
zipkin-server:
image: openzipkin/zipkin:2.23.2
restart: always
ports:
- 9411:9411
depends_on:
- rabbit-mq
environment:
RABBIT_URI: amqp://guest:guest@rabbit-mq:5672
networks:
- sc-network
cambio-db:
image: mysql:8.0.23
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
TZ: America/Sao_Paulo
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: cambio_service
MYSQL_ROOT_HOST: '%'
MYSQL_TCP_PORT: 3308
ports:
- 3308:3308
expose:
- 3308
networks:
- sc-network
book-db:
image: mysql:8.0.23
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
TZ: America/Sao_Paulo
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: book_service
MYSQL_ROOT_HOST: '%'
MYSQL_TCP_PORT: 3310
ports:
- 3310:3310
expose:
- 3310
networks:
- sc-network
naming-server:
image: naming-server
restart: always
build:
context: .
dockerfile: naming-server/Dockerfile
ports:
- 8761:8761
networks:
- sc-network
api-gateway:
image: api-gateway
restart: always
build:
context: .
dockerfile: api-gateway/Dockerfile
ports:
- 8765:8765
depends_on:
- naming-server
- rabbit-mq
environment:
EUREKA.CLIENT.SERVICEURL.DEFAULTZONE: http://naming-server:8761/eureka
SPRING.ZIPKIN.BASEURL: http://zipkin-server:9411/
RABBIT_URI: amqp://guest:guest@rabbit-mq:5672
SPRING_RABBITMQ_HOST: rabbit-mq
SPRING_ZIPKIN_SENDER_TYPE: rabbit
networks:
- sc-network
book-service:
image: book-service
restart: always
build:
context: .
dockerfile: book-service/Dockerfile
environment:
TZ: America/Sao_Paulo
EUREKA.CLIENT.SERVICEURL.DEFAULTZONE: http://naming-server:8761/eureka
SPRING.ZIPKIN.BASEURL: http://zipkin-server:9411/
RABBIT_URI: amqp://guest:guest@rabbit-mq:5672
SPRING_RABBITMQ_HOST: rabbit-mq
SPRING_ZIPKIN_SENDER_TYPE: rabbit
SPRING.DATASOURCE.URL: jdbc:mysql://book-db:3310/book_service?useSSL=false&serverTimezone=UTC&enabledTLSProtocols=TLSv1.2
SPRING.DATASOURCE.USERNAME: root
SPRING.DATASOURCE.PASSWORD: root
SPRING.FLYWAY.URL: jdbc:mysql://book-db:3310/book_service?useSSL=false&serverTimezone=UTC&enabledTLSProtocols=TLSv1.2
SPRING.FLYWAY.USERNAME: root
SPRING.FLYWAY.PASSWORD: root
ports:
- 8100:8100
depends_on:
- naming-server
- book-db
- rabbit-mq
networks:
- sc-network
cambio-service:
image: cambio-service
restart: always
build:
context: .
dockerfile: cambio-service/Dockerfile
environment:
TZ: America/Sao_Paulo
EUREKA.CLIENT.SERVICEURL.DEFAULTZONE: http://naming-server:8761/eureka
SPRING.ZIPKIN.BASEURL: http://zipkin-server:9411/
RABBIT_URI: amqp://guest:guest@rabbit-mq:5672
SPRING_RABBITMQ_HOST: rabbit-mq
SPRING_ZIPKIN_SENDER_TYPE: rabbit
SPRING.DATASOURCE.URL: jdbc:mysql://cambio-db:3308/cambio_service?useSSL=false&serverTimezone=UTC&enabledTLSProtocols=TLSv1.2
SPRING.DATASOURCE.USERNAME: root
SPRING.DATASOURCE.PASSWORD: root
SPRING.FLYWAY.URL: jdbc:mysql://cambio-db:3308/cambio_service?useSSL=false&serverTimezone=UTC&enabledTLSProtocols=TLSv1.2
SPRING.FLYWAY.USERNAME: root
SPRING.FLYWAY.PASSWORD: root
ports:
- 8000:8000
depends_on:
- naming-server
- cambio-db
- rabbit-mq
networks:
- sc-network
networks:
sc-network:
driver: bridge