Update docker-compose sample file to use local volume driver so data (#4937)

persists even after Minio container is stopped/deleted
This commit is contained in:
Nitish Tiwari 2017-09-20 01:13:45 +05:30 committed by Dee Koder
parent 71201273e2
commit fba1669966

View File

@ -4,35 +4,52 @@ version: '2'
# minio server's web interface will be accessible on the host at port # minio server's web interface will be accessible on the host at port
# 9001 through 9004. # 9001 through 9004.
services: services:
minio1: minio1:
image: minio/minio:RELEASE.2017-08-05T00-00-53Z image: minio/minio
ports: volumes:
- "9001:9000" - data1:/data
environment: ports:
MINIO_ACCESS_KEY: minio - "9001:9000"
MINIO_SECRET_KEY: minio123 environment:
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data MINIO_ACCESS_KEY: minio
minio2: MINIO_SECRET_KEY: minio123
image: minio/minio:RELEASE.2017-08-05T00-00-53Z command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
ports: minio2:
- "9002:9000" image: minio/minio
environment: volumes:
MINIO_ACCESS_KEY: minio - data2:/data
MINIO_SECRET_KEY: minio123 ports:
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data - "9002:9000"
minio3: environment:
image: minio/minio:RELEASE.2017-08-05T00-00-53Z MINIO_ACCESS_KEY: minio
ports: MINIO_SECRET_KEY: minio123
- "9003:9000" command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
environment: minio3:
MINIO_ACCESS_KEY: minio image: minio/minio
MINIO_SECRET_KEY: minio123 volumes:
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data - data3:/data
minio4: ports:
image: minio/minio:RELEASE.2017-08-05T00-00-53Z - "9003:9000"
ports: environment:
- "9004:9000" MINIO_ACCESS_KEY: minio
environment: MINIO_SECRET_KEY: minio123
MINIO_ACCESS_KEY: minio command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data
MINIO_SECRET_KEY: minio123 minio4:
command: server http://minio1/data http://minio2/data http://minio3/data http://minio4/data image: minio/minio
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
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
data1:
data2:
data3:
data4: