-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (79 loc) · 2 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
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: mysql-db
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: alper123
MYSQL_DATABASE: crudusers
MYSQL_USER: root
MYSQL_PASSWORD: alper123
volumes:
- mysql_data:/var/lib/mysql
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:management
container_name: rabbit-mq
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
mongo:
image: mongo:latest
container_name: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongopassword
MONGO_INITDB_DATABASE: notifications
volumes:
- mongo_data:/data/db
rest: # Student service
build:
context: ./rest
container_name: student-service
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/crudusers
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: alper123
SPRING_JPA_HIBERNATE_DDL_AUTO: update
SPRING_JPA_SHOW_SQL: "true"
SPRING_REDIS_HOST: redis
SPRING_REDIS_PORT: 6379
SPRING_RABBITMQ_HOST: rabbit-mq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_DEFAULT_USER: guest
SPRING_RABBITMQ_DEFAULT_PASS: guest
depends_on:
- mysql
- redis
- rabbitmq
notification: # Notification service
build:
context: ./notification
container_name: notification-service
ports:
- "8081:8081"
environment:
SPRING_DATA_MONGODB_URI: mongodb://mongoadmin:mongopassword@mongo:27017/notification_db
SPRING_RABBITMQ_HOST: rabbit-mq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_DEFAULT_USER: guest
SPRING_RABBITMQ_DEFAULT_PASS: guest
depends_on:
- rabbitmq
- mongo
volumes:
mysql_data:
mongo_data: