version: "3.9"
services:
minio:
image: minio/minio:latest
restart: always
#network_mode: host
container_name: minio
volumes:
- "./config:/root/.minio:rw"
- "./minio:/minio:rw"
- "./data:/data:rw"
ports:
- "9000:9000"
- "9001:9001"
#tty: true
privileged: true
#working_dir: /runA
command: ["server", "--console-address" ,":9001","/data"]
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=admin
#- MINIO_ACCESS_KEY=xxxxxxxxx
#- MINIO_SECRET_KEY=xxxxxxxxxx
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9010/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
https://min.io/docs/minio/linux/developers/go/API.html
#location设置(默认us-east-1)
MINIO_REGION_NAME=us-west-rack2
us-east-1(美国东一区)
us-west-1 us-west-2
sa-east-1
可以自定义区域
cn-east-1(中国东部1区) 或者zh-east-1
services:
minio:
image: minio/minio:RELEASE.2023-01-02T09-40-09Z.hotfix.5c99bdd49
deploy:
mode: replicated
replicas: 1
volumes:
- "$/config:/root/.minio:rw"
- "$/minio:/minio:rw"
- "$/data:/data:rw"
ports:
- "$:9000"
- "$:9001"
command: ["server", "--console-address" ,":9001","/data"]
environment:
- TZ=$
- LANG=$
- MINIO_ROOT_USER=${MINIO_ROOT_USER
- MINIO_ROOT_PASSWORD=$
networks:
- default-network
networks:
default-network:
name: $
external: true