-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
37 lines (35 loc) · 1.03 KB
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
services:
mysql:
image: mysql:8.0
container_name: campuscatch-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-campuscatch1234}
MYSQL_DATABASE: ${MYSQL_DATABASE:-campus_catch_db}
MYSQL_ROOT_HOST: '%'
TZ: Asia/Seoul
ports:
- "${MYSQL_PORT:-3307}:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./init-db:/docker-entrypoint-initdb.d # 초기화 스크립트 디렉터리
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --default-authentication-plugin=mysql_native_password
- --max_connections=200
- --innodb_buffer_pool_size=256M
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${MYSQL_ROOT_PASSWORD:-campuscatch1234}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- campuscatch-network
networks:
campuscatch-network:
driver: bridge
volumes:
mysql-data:
driver: local