version: '3'
services:
web:
image: minio/minio
container_name: minio-server
restart: always
ports:
- 9000:9000
volumes:
- /mnt/hdd/minio/data:/data
- /mnt/hdd/minio/config:/root/.minio
environment:
- TZ=Asia/Shanghai
- MINIO_ROOT_USER=YOUR_ACCESSKEY
- MINIO_ROOT_PASSWORD=YOUR_ACCESSSECRET
- MINIO_COMPRESS=on
- MINIO_COMPRESS_EXTENSIONS=".txt,.log,.tar"
- MINIO_BROWSER=off
command: [ "server", "/data" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3注释版
version: '3'
services:
web:
# 镜像
image: minio/minio
# 容器名称
container_name: minio-server
# docker重启时容器自动重启
restart: always
# 端口映射
ports:
- 9000:9000
# 数据持久化
volumes:
- /mnt/hdd/minio/data:/data
- /mnt/hdd/minio/config:/root/.minio
environment:
# 设置时区
- TZ=Asia/Shanghai
# 设置用户名(accessKey)
- MINIO_ROOT_USER=bxysdn
# 设置密码(accessSecret)
- MINIO_ROOT_PASSWORD=5JbZznMsHRTytTdD
# 开启压缩
- MINIO_COMPRESS=on
# 设置需要压缩的文件后缀名
- MINIO_COMPRESS_EXTENSIONS=".txt,.log,.tar"
# 关闭浏览器登录
- MINIO_BROWSER=off
# 启动命令
command: [ "server", "/data" ]
# 健康检测
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3