Docker 部署 minio

无心々菜發表於2024-07-17

Docker 部署 minio

minio是分散式檔案儲存

一. minio的yaml部署 http版的

services:
  minio-http:
    command:
      - 'server /data --console-address :9001'
    container_name: minio-http
    environment:
      - MINIO_ACCESS_KEY=username
      - MINIO_SECRET_KEY=qI7-****O6
    image: minio/minio:latest
    logging:
      driver: json-file
      options:
        max-file: 10
        max-size: 50M
    networks:
      - bridge
    ports:
      - 9300:9000/tcp
      - 9390:9001/tcp
    restart: always
    volumes:
      - /filestorage/9-9-TaskStorage/minio-http/data2:/data
      - /filestorage/9-9-TaskStorage/minio-http/config:/root/.minio
networks:
  bridge:
    external: true

一. minio的yaml部署 https版的

證書位置:/root/.minio/certs

services:
  test-minio-ssl:
    command:
      - 'server /data --console-address :9001'
    container_name: test-minio-ssl
    environment:
      - MINIO_ACCESS_KEY=username
      - MINIO_SECRET_KEY=qI7-****O6
    image: minio/minio:latest
    logging:
      driver: json-file
      options:
        max-file: 10
        max-size: 5000M
    networks:
      - 9-1-minio_mynet
    ports:
      - 9200:9000/tcp
      - 9290:9001/tcp
    restart: always
    volumes:
      - /filestorage/9-1-minio/data:/data
      - /filestorage/9-1-minio/config:/root/.minio
      - /filestorage/9-1-minio/config/certs:/root/.minio/certs
networks:
  9-1-minio_mynet:
    external: true

訪問:http://localhost:9290/login

帳號密碼在yaml配置的環境變數裡面

end.

相關文章