-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (51 loc) · 1.25 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
version: '3.7'
services:
#service 1: definition of mysql database
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
container_name: mysql-db
environment:
- MYSQL_DATABASE=springSecurity
- MYSQL_ROOT_PASSWORD=son1808
- MYSQL_USER=root
ports:
- "3306:3306"
restart: always
volumes:
- ./data:/var/lib/mysql
- ./sql:/docker-entrypoint-initdb.d
cap_add:
- SYS_NICE
#service 2: definition of phpMyAdmin
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: my-php-myadmin
ports:
- "8082:80"
restart: always
depends_on:
- db
links:
- db
environment:
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: son1808
#service 3: definition of spring-boot app
appservice:
image: spring-service
container_name: app-service-spring
build:
context: .
dockerfile: Dockerfile
ports:
- "80:8080"
restart: always
depends_on:
- db
links:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/insurance_portal?createDatabaseIfNotExist=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: son1808