-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
29 lines (26 loc) · 795 Bytes
/
docker-compose.yml
File metadata and controls
29 lines (26 loc) · 795 Bytes
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
db:
image: mysql
container_name: mysql_db
environment:
MYSQL_ROOT_PASSWORD: sesame
MYSQL_DATABASE: lottery
MYSQL_USER: user
MYSQL_PASSWORD: password
ports:
- "33333:3306"
volumes:
- ./db/data.sql:/docker-entrypoint-initdb.d/data.sql
web:
image: tomcat
container_name: tomcat_server
environment:
JDBC_URL: jdbc:mysql://db:3306/lottery?connectTimeout=0&socketTimeout=0&autoReconnect=true
JDBC_USER: user
JDBC_PASS: password
ports:
- "44444:8080"
volumes:
- ./tomcat/webapps/ROOT/index.jsp:/usr/local/tomcat/webapps/ROOT/index.jsp
- ./tomcat/webapps/LotteryWebApp_war.war:/usr/local/tomcat/webapps/LotteryWebApp_war.war
links:
- db