docs: add hostname entry for docker stack deploy

This commit is contained in:
Harshavardhana 2021-05-31 19:11:52 -07:00
parent 5cd6253508
commit ab7410af11
2 changed files with 17 additions and 2 deletions

View File

@ -20,6 +20,12 @@ docker-compose pull
docker-compose up docker-compose up
``` ```
or
```sh
docker stack deploy --compose-file docker-compose.yaml minio
```
### Windows ### Windows
```sh ```sh
@ -27,7 +33,11 @@ docker-compose.exe pull
docker-compose.exe up 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. 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.

View File

@ -6,6 +6,7 @@ version: '3.7'
services: services:
minio1: minio1:
image: minio/minio:RELEASE.2021-05-27T22-06-31Z image: minio/minio:RELEASE.2021-05-27T22-06-31Z
hostname: minio1
volumes: volumes:
- data1-1:/data1 - data1-1:/data1
- data1-2:/data2 - data1-2:/data2
@ -23,6 +24,7 @@ services:
minio2: minio2:
image: minio/minio:RELEASE.2021-05-27T22-06-31Z image: minio/minio:RELEASE.2021-05-27T22-06-31Z
hostname: minio2
volumes: volumes:
- data2-1:/data1 - data2-1:/data1
- data2-2:/data2 - data2-2:/data2
@ -40,6 +42,7 @@ services:
minio3: minio3:
image: minio/minio:RELEASE.2021-05-27T22-06-31Z image: minio/minio:RELEASE.2021-05-27T22-06-31Z
hostname: minio3
volumes: volumes:
- data3-1:/data1 - data3-1:/data1
- data3-2:/data2 - data3-2:/data2
@ -57,6 +60,7 @@ services:
minio4: minio4:
image: minio/minio:RELEASE.2021-05-27T22-06-31Z image: minio/minio:RELEASE.2021-05-27T22-06-31Z
hostname: minio4
volumes: volumes:
- data4-1:/data1 - data4-1:/data1
- data4-2:/data2 - data4-2:/data2
@ -74,6 +78,7 @@ services:
nginx: nginx:
image: nginx:1.19.2-alpine image: nginx:1.19.2-alpine
hostname: nginx
volumes: volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
ports: ports: