forked from project-web-chatty/chatty-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (65 loc) · 1.62 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
# local execution (for frontend developer)
services:
springboot:
image: sh020119/websocket_test:latest
container_name: springboot_container
ports:
- "8080:8080"
depends_on:
- mongodb
- rabbitmq
- mysql_app
environment:
SPRING_DATA_MONGODB_URI: mongodb://mongodb:27017/chatty_db
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_RABBITMQ_USERNAME: guest
SPRING_RABBITMQ_PASSWORD: guest
SPRING_RABBITMQ_VIRTUAL_HOST: "/"
SPRING_DATASOURCE_URL : jdbc:mysql://mysql_app:3306/chatty_db?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
SPRING_DATASOURCE_USERNAME : root
SPRING_DATASOURCE_PASSWORD : 0000
networks:
- my_network
mongodb:
image: mongo:latest
container_name: mongodb_container
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
networks:
- my_network
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq_container
ports:
- "5672:5672"
- "15672:15672"
- "61613:61613"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
volumes:
- rabbitmq_data:/var/lib/rabbitmq
command: >
sh -c "rabbitmq-plugins enable --offline rabbitmq_stomp &&
rabbitmq-server"
networks:
- my_network
mysql_app:
image: mysql:latest
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: chatty_db
volumes:
- mysql_data:/var/lib/mysql
networks:
- my_network
volumes:
mongo_data:
rabbitmq_data:
mysql_data:
networks:
my_network: