-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (38 loc) · 1.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
46 lines (38 loc) · 1.01 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
version: "3.8"
services:
mysql-service:
image: mysql:8.0
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=Waivers
- MYSQL_USER= test
- MYSQL_PASSWORD= test
ports:
- 3307:3306
volumes:
- my-db:/var/lib/mysql
web-service:
depends_on:
- mysql-service
build:
context: ./
dockerfile: Dockerfile
restart: on-failure
ports:
- 8000:8080
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://mysql-service:3306/Waivers?allowPublicKeyRetrieval=true&useSSL=false",
"spring.datasource.username" : "root",
"spring.datasource.password" : "password",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.MySQL8Dialect",
"spring.jpa.generate-ddl" : true,
"spring.jpa.hibernate.ddl-auto" : "update"
}'
stdin_open: true
tty: true
volumes:
my-db:
driver: local
# Names our volume