Spaces:
Sleeping
Sleeping
| 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 | |