docker-compose部署minio与Prometheus
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.2020-07-02T00-15-09Z volumes: - /data/minio-cluster/minio1/data1:/data1 - /data/minio-cluster/minio1/data2:/data2 ports: - "9001:9000" environment: MINIO_ACCESS_KEY: minio MINIO_SECRET_KEY: minio123 MINIO_PROMETHEUS_AUTH_TYPE: public 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.2020-07-02T00-15-09Z volumes: - /data/minio-cluster/minio2/data1:/data1 - /data/minio-cluster/minio2/data2:/data2 ports: - "9002:9000" environment: MINIO_ACCESS_KEY: minio MINIO_SECRET_KEY: minio123 MINIO_PROMETHEUS_AUTH_TYPE: public 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.2020-07-02T00-15-09Z volumes: - /data/minio-cluster/minio3/data1:/data1 - /data/minio-cluster/minio3/data2:/data2 ports: - "9003:9000" environment: MINIO_ACCESS_KEY: minio MINIO_SECRET_KEY: minio123 MINIO_PROMETHEUS_AUTH_TYPE: public 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.2020-07-02T00-15-09Z volumes: - /data/minio-cluster/minio4/data1:/data1 - /data/minio-cluster/minio4/data2:/data2 ports: - "9004:9000" environment: MINIO_ACCESS_KEY: minio MINIO_SECRET_KEY: minio123 MINIO_PROMETHEUS_AUTH_TYPE: public 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
prometheus:
image: minio/minio:RELEASE.2020-07-02T00-15-09Z
ports:
- "9004:9090"
volumes:
- /tmp/prometheus.yml:/etc/prometheus/prometheus.yml