Skip to content

Commit f7e86fc

Browse files
committed
Add Docker Compose file for MySQL service setup
This file configures a MySQL container with persistent storage, port mapping, and default environment variables. It includes platform-specific notes for Apple Silicon Macs and adjusts MySQL settings for UTF-8 support and case-insensitive table names.
1 parent 6e65e74 commit f7e86fc

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

spring-boot/docker-compose.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: '3.8'
2+
services:
3+
template:
4+
image: mysql:latest
5+
6+
# 애플 실리콘 맥을 사용하는 경우 아래 platform 을 주석처리 해제
7+
# platform: linux/amd64
8+
volumes:
9+
- template:/data
10+
ports:
11+
- '3306:3306'
12+
environment:
13+
MYSQL_ROOT_USER: root
14+
MYSQL_ROOT_PASSWORD: test1234
15+
MYSQL_DATABASE: template
16+
command:
17+
[ 'mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--lower_case_table_names=1' ]
18+
19+
volumes:
20+
template:

0 commit comments

Comments
 (0)