Spaces:
Sleeping
Sleeping
File size: 1,525 Bytes
82c1146 fdd1575 82c1146 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: smart_mysql
restart: unless-stopped
# ํ๊ฒฝ ๋ณ์
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-1q2w3e4r}
MYSQL_DATABASE: ${MYSQL_DATABASE:-smarteyessen_db}
# ์ ํ์ : ์ถ๊ฐ ์ฌ์ฉ์ ์์ฑ
# MYSQL_USER: smarteye_user
# MYSQL_PASSWORD: smarteye_pass
# ํฌํธ ๋งคํ
ports:
- "${MYSQL_PORT:-3308}:3306"
# MySQL ์๋ฒ ์ค์ (UTF-8 ๊ฐ์ )
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --default-authentication-plugin=mysql_native_password
- --max-connections=200
- --sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
# ๋ฐ์ดํฐ ์ง์์ฑ (Named Volume ์ฌ์ฉ)
volumes:
- smart_mysql_data:/var/lib/mysql
# ์ด๊ธฐํ ์คํฌ๋ฆฝํธ (์ปจํ
์ด๋ ์ต์ด ์คํ ์ ์๋ ์คํ)
- ./scripts/init_db_complete.sql:/docker-entrypoint-initdb.d/01_init.sql:ro
# ํฌ์ค์ฒดํฌ
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p1q2w3e4r"]
interval: 10s
timeout: 5s
retries: 5
# ๋คํธ์ํฌ
networks:
- smarteye_network
# Named Volume ์ ์
volumes:
smart_mysql_data:
name: smart_mysql_data
driver: local
# ๋คํธ์ํฌ ์ ์
networks:
smarteye_network:
name: smarteye_network
driver: bridge
|