mirror of
https://github.com/minio/minio.git
synced 2024-12-26 23:25:54 -05:00
e5fb6294a7
There are multiple possibilities for running MinIO within a container e.g. configurable address, non-root user etc. This makes it difficult to identify actual IP / Port to use to check healthcheck status from within a container. It is simpler to use external healthcheck mechanisms like healthcheck command in docker-compose to check for MinIO health status. This is similar to how checks work in Kubernetes as well. This PR removes the healthcheck script used inside Docker container and ad documentation on how to use docker-compose based healthcheck mechanism.
83 lines
2.2 KiB
YAML
83 lines
2.2 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-14T20-37-41Z
|
|
volumes:
|
|
- data1:/data
|
|
ports:
|
|
- "9001:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://minio1:9000/minio/health/live"]
|
|
interval: 1m30s
|
|
timeout: 20s
|
|
retries: 3
|
|
start_period: 3m
|
|
|
|
minio2:
|
|
image: minio/minio:RELEASE.2019-08-14T20-37-41Z
|
|
volumes:
|
|
- data2:/data
|
|
ports:
|
|
- "9002:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://minio2:9000/minio/health/live"]
|
|
interval: 1m30s
|
|
timeout: 20s
|
|
retries: 3
|
|
start_period: 3m
|
|
|
|
minio3:
|
|
image: minio/minio:RELEASE.2019-08-14T20-37-41Z
|
|
volumes:
|
|
- data3:/data
|
|
ports:
|
|
- "9003:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://minio3:9000/minio/health/live"]
|
|
interval: 1m30s
|
|
timeout: 20s
|
|
retries: 3
|
|
start_period: 3m
|
|
|
|
minio4:
|
|
image: minio/minio:RELEASE.2019-08-14T20-37-41Z
|
|
volumes:
|
|
- data4:/data
|
|
ports:
|
|
- "9004:9000"
|
|
environment:
|
|
MINIO_ACCESS_KEY: minio
|
|
MINIO_SECRET_KEY: minio123
|
|
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://minio4:9000/minio/health/live"]
|
|
interval: 1m30s
|
|
timeout: 20s
|
|
retries: 3
|
|
start_period: 3m
|
|
|
|
## By default this config uses default local driver,
|
|
## For custom volumes replace with volume driver configuration.
|
|
volumes:
|
|
data1:
|
|
data2:
|
|
data3:
|
|
data4:
|
|
|