-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
32 lines (31 loc) · 1.04 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
services:
mysqldb:
image: mysql:8
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
ports:
- "${MYSQL_LOCAL_PORT}:${MYSQL_DOCKER_PORT}"
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -P ${MYSQL_DOCKER_PORT} -u ${MYSQL_USER} -p${MYSQL_ROOT_PASSWORD}"]
interval: 30s
timeout: 10s
retries: 3
app:
depends_on:
mysqldb:
condition: service_healthy
image: book-service
build: .
ports:
- "${SPRING_LOCAL_PORT}:${SPRING_DOCKER_PORT}"
- "${DEBUG_PORT}:${DEBUG_PORT}"
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url": "jdbc:mysql://mysqldb:${MYSQL_DOCKER_PORT}/${MYSQL_DATABASE}?serverTimezone=UTC",
"spring.datasource.username": "${MYSQL_USER}",
"spring.datasource.password": "${MYSQL_ROOT_PASSWORD}",
"jwt.secret": "${JWT_SECRET}"
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"