diff --git a/docs/orchestration/docker-compose/README.md b/docs/orchestration/docker-compose/README.md index b3b22b82b..cb83bbd64 100644 --- a/docs/orchestration/docker-compose/README.md +++ b/docs/orchestration/docker-compose/README.md @@ -2,7 +2,7 @@ Docker Compose allows defining and running single host, multi-container Docker applications. -With Compose, you use a Compose file to configure MinIO services. Then, using a single command, you can create and launch all the Distributed MinIO instances from your configuration. Distributed MinIO instances will be deployed in multiple containers on the same host. This is a great way to set up development, testing, and staging environments, based on Distributed MinIO. +With Compose, you use a Compose file to configure MinIO services. Then, using a single command, you can create and launch all the Distributed MinIO instances from your configuration. Distributed MinIO instances will be deployed in multiple containers on the same host. This is a great way to set up development, testing, and staging environments, based on Distributed MinIO. ## 1. Prerequisites @@ -20,6 +20,12 @@ docker-compose pull docker-compose up ``` +or + +```sh +docker stack deploy --compose-file docker-compose.yaml minio +``` + ### Windows ```sh @@ -27,7 +33,11 @@ docker-compose.exe pull docker-compose.exe up ``` -> NOTE: We recommend that you use `docker-compose` instead of `docker stack deploy` - the containers started by `docker stack deploy` get deployed as a single container with a virtual networking layer at routing does not allow MinIO distributed setup to run properly. +or + +```sh +docker stack deploy --compose-file docker-compose.yaml minio +``` Distributed instances are now accessible on the host at ports 9000, proceed to access the Web browser at http://127.0.0.1:9000/. Here 4 MinIO server instances are reverse proxied through Nginx load balancing. diff --git a/docs/orchestration/docker-compose/docker-compose.yaml b/docs/orchestration/docker-compose/docker-compose.yaml index 3393cdc47..641875255 100644 --- a/docs/orchestration/docker-compose/docker-compose.yaml +++ b/docs/orchestration/docker-compose/docker-compose.yaml @@ -6,6 +6,7 @@ version: '3.7' services: minio1: image: minio/minio:RELEASE.2021-05-27T22-06-31Z + hostname: minio1 volumes: - data1-1:/data1 - data1-2:/data2 @@ -23,6 +24,7 @@ services: minio2: image: minio/minio:RELEASE.2021-05-27T22-06-31Z + hostname: minio2 volumes: - data2-1:/data1 - data2-2:/data2 @@ -40,6 +42,7 @@ services: minio3: image: minio/minio:RELEASE.2021-05-27T22-06-31Z + hostname: minio3 volumes: - data3-1:/data1 - data3-2:/data2 @@ -57,6 +60,7 @@ services: minio4: image: minio/minio:RELEASE.2021-05-27T22-06-31Z + hostname: minio4 volumes: - data4-1:/data1 - data4-2:/data2 @@ -74,6 +78,7 @@ services: nginx: image: nginx:1.19.2-alpine + hostname: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: