-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-tomcat-mysql.yaml
More file actions
64 lines (60 loc) · 1.61 KB
/
docker-compose-tomcat-mysql.yaml
File metadata and controls
64 lines (60 loc) · 1.61 KB
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
networks:
default:
driver: bridge
ipam:
config:
- subnet: 10.90.0.0/24
gateway: 10.90.0.1
services:
mysql:
image: docker.io/mysql:latest
container_name: mysql
hostname: mysql_server
environment:
MYSQL_ROOT_PASSWORD: nimda
MYSQL_DATABASE: example_db
MYSQL_USER: example_db_user
MYSQL_PASSWORD: example_db_pass
networks:
default:
ipv4_address: 10.90.0.1
web1:
image: tomcat:9.0
container_name: tomcat1
hostname: tomcat_primary
environment:
JDBC_URL: jdbc:mysql://mysql_server:3306/example_db?connectTimeout=0&socketTimeout=0&autoReconnect=true
JDBC_USER: example_db_user
JDBC_PASS: example_db_pass
ports:
- "8085:8080"
- "5109:5005"
networks:
default:
ipv4_address: 10.90.0.7
volumes:
- /Users/thomas/IdeaProjects/tomcatOpenShift/logs/:/usr/local/tomcat/logs/
web2:
image: tomcat:9.0
container_name: tomcat2
environment:
JDBC_URL: jdbc:mysql://mysql_server:3306/example_db?connectTimeout=0&socketTimeout=0&autoReconnect=true
JDBC_USER: example_db_user
JDBC_PASS: example_db_pass
ports:
- "8086:8080"
networks:
default:
ipv4_address: 10.90.0.6
web3:
image: tomcat:9.0
container_name: tomcat3
environment:
JDBC_URL: jdbc:mysql://mysql_server:3306/example_db?connectTimeout=0&socketTimeout=0&autoReconnect=true
JDBC_USER: example_db_user
JDBC_PASS: example_db_pass
ports:
- "8087:8080"
networks:
default:
ipv4_address: 10.90.0.5