forked from Project-Books/book-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (39 loc) · 902 Bytes
/
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
version: '3'
services:
mysql:
image: mysql:latest
hostname: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: bookproject
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpassword
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./src/main/resources/db/init.sql:/data/application/init.sql
command: --init-file /data/application/init.sql
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
links:
- mysql:db
ports:
- "8081:80"
bookapp:
build: ./
restart: on-failure
ports:
- "8080:8080"
environment:
- WAIT_HOSTS=mysql:3306
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=30
- WAIT_HOST_CONNECT_TIMEOUT=30
#- DEFAULT_PATH=<Target path in windows>
depends_on:
- mysql
- phpmyadmin
volumes:
db_data: