version: "3.8"
services:
  mysql:
    image: mysql:5.7
    environment:  # 환경변수
      MYSQL_USER: msaportal
      MYSQL_DATABASE: msaportal
      MYSQL_PASSWORD: msaportal
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
      MYSQL_ROOT_HOST: "%"
      TZ: Asia/Seoul
    command: # 명령어 실행 - characterset 지정
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci
    volumes:
      - "${HOME}/docker-volume/mysql/:/var/lib/mysql"
      - "./init/:/docker-entrypoint-initdb.d/"
    ports:
      - "3306:3306"
    container_name: mysql
