version: '3.8'

services:
  node:
    image: 'docker.1ms.run/node:20.18.3'
    container_name: node
    restart: always
    working_dir: /app
    volumes:
      - /mnt/app:/app
    ports:
      - '8080:8080'
    command: 'sleep infinity'

  mysql:
    image: 'docker.1ms.run/mysql:8.0.36'
    container_name: mysql
    restart: always
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    volumes:
      - /mnt/mysql-data:/var/lib/mysql
    ports:
      - '3306:3306'

  redis:
    image: 'docker.1ms.run/redis:7.0.4'
    container_name: redis
    restart: always
    volumes:
      - /mnt/redis-data:/data
    ports:
      - '6379:6379'

  phpmyadmin:
    image: 'docker.1ms.run/phpmyadmin:latest'
    container_name: phpmyadmin
    restart: always
    environment:
      APACHE_PORT: 80  # 容器内端口，通常为80
      PMA_ABSOLUTE_URI: 'http://localhost:38090/'
      PMA_USER: 'root'
      PMA_HOST: mysql  # 修正拼写错误: 从myssql改为mysql
      PMA_PORT: 3306   # 整数或字符串均可，但建议保持一致
    ports:
      - '38090:80'     # 宿主机端口:容器内端口
    depends_on:
      - mysql

  minio:
    image: 'docker.1ms.run/minio:latest'
    container_name: minio
    restart: always
    volumes:
      - /mnt/minio-data:/data
    ports:
      - '9000:9000'
      - '9001:9001'
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
      MINIO_DEFAULT_BUCKETS: 'd8dai'
      MINIO_BROWSER: "on"
