2021-10-19 04:26:33 +00:00
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
# Settings and configurations that are common for all containers
|
|
|
|
x-minio-common: &minio-common
|
|
|
|
image: quay.io/minio/minio:RELEASE.2021-10-13T00-23-17Z
|
|
|
|
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
|
|
|
|
expose:
|
|
|
|
- "9000"
|
|
|
|
- "9001"
|
|
|
|
environment:
|
|
|
|
MINIO_ROOT_USER: minio
|
|
|
|
MINIO_ROOT_PASSWORD: minio123
|
|
|
|
healthcheck:
|
2022-05-06 12:51:04 +00:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
2021-10-19 04:26:33 +00:00
|
|
|
interval: 30s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 3
|
|
|
|
|
|
|
|
# starts 4 docker containers running minio server instances.
|
|
|
|
# using nginx reverse proxy, load balancing, you can access
|
|
|
|
# it through port 9000.
|
|
|
|
services:
|
|
|
|
minio1:
|
|
|
|
<<: *minio-common
|
|
|
|
hostname: minio1
|
|
|
|
|
|
|
|
minio2:
|
|
|
|
<<: *minio-common
|
|
|
|
hostname: minio2
|
|
|
|
|
|
|
|
minio3:
|
|
|
|
<<: *minio-common
|
|
|
|
hostname: minio3
|
|
|
|
|
|
|
|
minio4:
|
|
|
|
<<: *minio-common
|
|
|
|
hostname: minio4
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
image: nginx:1.19.2-alpine
|
|
|
|
hostname: nginx
|
|
|
|
volumes:
|
|
|
|
- ./nginx-minio-cluster.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
ports:
|
|
|
|
- "9000:9000"
|
|
|
|
- "9001:9001"
|
|
|
|
depends_on:
|
|
|
|
- minio1
|
|
|
|
- minio2
|
|
|
|
- minio3
|
|
|
|
- minio4
|