mirror of
https://github.com/minio/minio.git
synced 2025-02-19 09:32:31 -05:00
With this PR, liveness check responds with 200 OK with "server-not- initialized" header while objectLayer gets initialized. The header is removed as objectLayer is initialized. This is to allow MinIO distributed cluster to get started when running on an orchestration platforms like Docker Swarm. This PR also updates sample Swarm yaml files to use correct values for healthcheck fields. Fixes #8140
87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
version: '3.7'
|
|
|
|
# starts 4 docker containers running minio server instances. Each
|
|
# minio server's web interface will be accessible on the host at port
|
|
# 9001 through 9004.
|
|
services:
|
|
minio1:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
volumes:
|
|
- data1-1:/data1
|
|
- data1-2:/data2
|
|
ports:
|
|
- "9001:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio{1...4}/data{1...2}
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio2:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
volumes:
|
|
- data2-1:/data1
|
|
- data2-2:/data2
|
|
ports:
|
|
- "9002:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio{1...4}/data{1...2}
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio3:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
volumes:
|
|
- data3-1:/data1
|
|
- data3-2:/data2
|
|
ports:
|
|
- "9003:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio{1...4}/data{1...2}
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
minio4:
|
|
image: minio/minio:RELEASE.2019-08-29T00-25-01Z
|
|
volumes:
|
|
- data4-1:/data1
|
|
- data4-2:/data2
|
|
ports:
|
|
- "9004:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio{1...4}/data{1...2}
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
## By default this config uses default local driver,
|
|
## For custom volumes replace with volume driver configuration.
|
|
volumes:
|
|
data1-1:
|
|
data1-2:
|
|
data2-1:
|
|
data2-2:
|
|
data3-1:
|
|
data3-2:
|
|
data4-1:
|
|
data4-2:
|
|
|