-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (35 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
version: "3.8"
services:
mysqldb:
image: mysql
restart: unless-stopped
env_file: ./.env
ports:
- $MYSQL_LOCAL_PORT:$MYSQL_DOCKER_PORT
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
MYSQL_USER: $MYSQL_USER
MYSQL_PASSWORD: $MYSQL_PASSWORD
app:
depends_on:
- mysqldb
restart: on-failure
image: car-sharing
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:3306/$MYSQL_DATABASE?createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
"spring.datasource.username" : "$MYSQL_USER",
"spring.datasource.password" : "$MYSQL_PASSWORD",
"spring.datasource.driver-class-name" : "com.mysql.cj.jdbc.Driver",
"spring.jpa.hibernate.ddl-aut" : "validate",
"spring.jpa.show-sql" : "true",
"jwt.expiration" : "$JWT_EXPIRATION_TIME",
"jwt_secret" : "$JWT_SECRET"
}'
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"