-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (39 loc) · 1004 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
31
32
33
34
35
36
37
38
39
40
41
42
version: '3'
services:
database:
container_name: mysql_db
image: mysql/mysql-server:5.7
restart: unless-stopped
environment:
MYSQL_DATABASE: everytime
MYSQL_ROOT_HOST: 'localhost'
MYSQL_ROOT_PASSWORD: 0000
TZ: 'Asia/Seoul'
ports:
- "3306:3306"
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d # MySQL 설정 파일 위치
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
networks:
- test_network
application:
container_name: docker-compose-test
restart: on-failure
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql_db:3306/everytime?useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: "root"
SPRING_DATASOURCE_PASSWORD: "0000"
depends_on:
- database
networks:
- test_network
networks:
test_network: