version: "3.9" services: mysql-apitest: image: mysql:8.0.32 container_name: peipei-mysql-apitest restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: peipei_apitest MYSQL_USER: apitest MYSQL_PASSWORD: apitest ports: - "33306:3306" volumes: - ./apitest-mysql/init:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uroot", "-proot"] interval: 10s timeout: 5s retries: 10 command: - "--default-authentication-plugin=mysql_native_password" - "--lower_case_table_names=1" - "--explicit_defaults_for_timestamp=1" - "--character-set-server=utf8mb4" - "--collation-server=utf8mb4_unicode_ci"