-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
134 lines (126 loc) · 2.91 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
services:
manager:
container_name: manager_server
build:
context: ./np-rabbitmq-manager
dockerfile: Dockerfile
ports:
- "9090:9090"
environment:
- SPRING_MAIL_HOST=smtp.gmail.com
- SPRING_MAIL_PORT=587
- EMAIL_USERNAME=${EMAIL_USERNAME}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- SPRING_RABBITMQ_HOST=rabbitmq
- FTP_HOST=ftp
- NP_WEB_SERVER_HOST=node-1
networks:
- np_network
depends_on:
- rabbitmq
- node-1
- node-2
- node-3
- ftp
node-1:
container_name: node-1
build:
context: ./np-web-server
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/interauto_db
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=root123
- SERVER_HOST=node-1
- SERVER_PORT=8080
- NODE_ID=1
- MANAGER_SERVER_HOST=manager
networks:
- np_network
depends_on:
db:
condition: service_healthy
node-2:
container_name: node-2
build:
context: ./np-web-server
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/interauto_db
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=root123
- SERVER_HOST=node-2
- SERVER_PORT=8081
- NODE_ID=2
- MANAGER_SERVER_HOST=manager
networks:
- np_network
depends_on:
db:
condition: service_healthy
node-3:
container_name: node-3
build:
context: ./np-web-server
dockerfile: Dockerfile
ports:
- "8082:8082"
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/interauto_db
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=root123
- SERVER_HOST=node-3
- SERVER_PORT=8082
- NODE_ID=3
- MANAGER_SERVER_HOST=manager
networks:
- np_network
depends_on:
db:
condition: service_healthy
db:
image: mysql:5.7
container_name: interauto_db
environment:
- MYSQL_DATABASE=interauto_db
- MYSQL_ROOT_PASSWORD=root123
volumes:
- mysql-data:/var/lib/mysql
networks:
- np_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
interval: 10s
retries: 5
timeout: 3s
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
networks:
- np_network
ftp:
image: stilliard/pure-ftpd:hardened
container_name: ftp
ports:
- "21:21"
- "30000-30009:30000-30009"
environment:
FTP_USER_NAME: testuser
FTP_USER_PASS: testpass
FTP_USER_HOME: /home/testuser
volumes:
- ./ftp_data:/home/testuser
networks:
- np_network
networks:
np_network:
driver: bridge
volumes:
mysql-data: