-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.develop.yml
43 lines (41 loc) · 1.19 KB
/
docker-compose.develop.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
version: "3.7"
services:
database:
container_name: todo_mysql_container
restart: always
build:
context: ./DataBase/mysql
dockerfile: Dockerfile
hostname: database
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
expose:
- 3306
ports:
- 3306:3306
volumes:
- ./DataBase/mysql/sql:/docker-entrypoint-initdb.d
- ./DataBase/mysql/config:/etc/mysql/conf.d
backend:
container_name: todo_spring_container
restart: always
working_dir: /var/app
image: adoptopenjdk/openjdk11:alpine
entrypoint: "./gradlew bootrun"
depends_on:
- database
ports:
- "8080:8080"
# for remote debug
- "5005:5005"
volumes:
- "./BackEnd:/var/app"
- "~/.gradle:/root/.gradle"
environment:
spring.datasource.driverClassName: "com.mysql.cj.jdbc.Driver"
spring.datasource.url: "jdbc:mysql://database/starter?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false"
spring.datasource.username: ${MYSQL_USER}
spring.datasource.password: ${MYSQL_PASSWORD}