-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
30 lines (29 loc) · 942 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
version: "3.8"
services:
mysqldb:
image: mysql:5.7
restart: unless-stopped
env_file: ./.env
environment:
- MYSQL_DATABASE=$MYSQLDB_DATABASE
- MYSQL_ROOT_PASSWORD=$MYSQLDB_ROOT_PASSWORD
ports:
- $MYSQL_LOCAL_PORT:$MYSQL_DB_DOCKER_PORT
app:
depends_on:
- mysqldb
image: online_book_store
restart: unless-stopped
build: .
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
- $DEBUG_PORT:$DEBUG_PORT
environment:
SPRING_APPLICATION_JSON: '{
"spring.datasource.url" : "jdbc:mysql://mysqldb:$MYSQL_DB_DOCKER_PORT/$MYSQLDB_DATABASE?serverTimezone=UTC",
"spring.datasource.username" : "$MYSQLDB_USER",
"spring.datasource.password" : "$MYSQLDB_ROOT_PASSWORD",
"spring.jpa.hibernate.ddl-auto" : "validate"
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"