services:
  mysql:
    image: mysql:8.4
    container_name: ocr-platform-mysql
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: ${MYSQL_DATABASE:-ocrplatform}
      MYSQL_USER: ${MYSQL_USER:-ocrplatform_app}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-change-me}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-change-me-root-admin-only}
      TZ: Asia/Shanghai
    ports:
      - "13306:3306"
    volumes:
      - mysql-data:/var/lib/mysql
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_0900_ai_ci

volumes:
  mysql-data:
