-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
99 lines (93 loc) · 2.41 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
version: '3.9'
services:
user-management-ms:
image: user-management-ms
build:
context: ./user-management-ms
dockerfile: Dockerfile
container_name: user-management-ms
restart: always
ports:
- "8080:8080"
environment:
TZ: America/Sao_Paulo
SPRING.DATASOURCE.URL: jdbc:mysql://mysql-user-db:3306/user_management_db?createDatabaseIfNotExist=true&serverTimezone=UTC&autoReconnect=true
SPRING.DATASOURCE.USERNAME: root
SPRING.DATASOURCE.PASSWORD: root
SPRING.RABBITMQ.HOST: rabbitmq
SPRING.RABBITMQ.PORT: 5672
SPRING.RABBITMQ.USERNAME: guest
SPRING.RABBITMQ.PASSWORD: guest
command: mvn spring-boot:run
depends_on:
mysql-user-db:
condition: service_started
networks:
- user-system-network
mysql-user-db:
image: mysql:8.0.34
container_name: mysql-user-db
command: mysqld --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3309:3309"
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=user_management_db
- TZ=America/Sao_Paulo
expose:
- 3309
networks:
- user-system-network
notify-ms:
image: notify-ms
restart: always
build:
context: ./notify-ms
dockerfile: Dockerfile
container_name: notify-ms
ports:
- "8081:8081"
environment:
SPRING.DATA.MONGODB.URI: mongodb://mongo-notify-db:27017/notify_db
SPRING.RABBITMQ.HOST: rabbitmq
SPRING.RABBITMQ.PORT: 5672
SPRING.RABBITMQ.USERNAME: guest
SPRING.RABBITMQ.PASSWORD: guest
command: mvn spring-boot:run
depends_on:
mongo-notify-db:
condition: service_started
rabbitmq:
condition: service_healthy
networks:
- user-system-network
mongo-notify-db:
image: mongo
container_name: mongo-notify-db
environment:
MONGO_INITDB_DATABASE: logs
ports:
- "27017:27017"
networks:
- user-system-network
rabbitmq:
image: rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
timeout: 100s
interval: 100s
retries: 3
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
environment:
RABBITMQ_DEFAULT_USER: "guest"
RABBITMQ_DEFAULT_PASSWORD: "guest"
RABBITMQ_DEFAULT_VHOST: "/"
networks:
- user-system-network
networks:
user-system-network:
driver: bridge