version: '3.8'
services:
  mysql:
    image: mysql:8.0
    container_name: demo-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=177615
      - MYSQL_DATABASE=aigc
      - MYSQL_USER=demo
      - MYSQL_PASSWORD=demo_pass
    ports:
      - "3306:3306"
    command: ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
    volumes:
      - mysql_data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      interval: 10s
      timeout: 5s
      retries: 5
volumes:
  mysql_data:





