-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (46 loc) · 1.19 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
version: '3.1'
services:
db:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: 24Meds
MYSQL_USER: user
MYSQL_PASSWORD: user
MYSQL_ROOT_PASSWORD: user
volumes:
- datafiles:/var/lib/mysql
restart: always
cap_add:
- SYS_NICE # CAP_SYS_NICE
healthcheck:
test: "mysql 24Meds -uuser -puser -e 'SELECT 1;'"
interval: 20s
timeout: 10s
retries: 2
market:
depends_on:
db:
condition: service_healthy
build: ./market
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://db:3306/24Meds?useSSL=true",
"spring.datasource.username" : "user",
"spring.datasource.password" : "user",
"spring.jpa.properties.hibernate.dialect" : "org.hibernate.dialect.MySQL8Dialect",
"spring.jpa.hibernate.ddl-auto" : "update",
"server.port": 8000
}'
ports:
- 6767:8000
restart: on-failure
healthcheck:
test: "curl http://localhost:8000"
interval: 20s
timeout: 10s
retries: 2
volumes:
datafiles: