This commit is contained in:
Vassiliy Yegorov
2020-11-24 14:39:03 +07:00
commit 084ed53b2a
8 changed files with 300 additions and 0 deletions

141
docker-compose-minio.yaml Normal file
View File

@@ -0,0 +1,141 @@
version: '3.7'
services:
balancer:
image: nginx
hostname: balancer
ports:
- "8080:80"
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.role==manager
configs:
- source: lb.conf
target: /etc/nginx/conf.d/lb.conf
minio1:
image: minio/minio:RELEASE.2020-11-13T20-10-18Z
hostname: minio1
volumes:
- minio1-data:/export
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio1==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio2:
image: minio/minio:RELEASE.2020-11-13T20-10-18Z
hostname: minio2
volumes:
- minio2-data:/export
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio2==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio3:
image: minio/minio:RELEASE.2020-11-13T20-10-18Z
hostname: minio3
volumes:
- minio3-data:/export
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio3==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
minio4:
image: minio/minio:RELEASE.2020-11-13T20-10-18Z
hostname: minio4
volumes:
- minio4-data:/export
networks:
- minio_distributed
deploy:
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
placement:
constraints:
- node.labels.minio4==true
command: server http://minio{1...4}/export
secrets:
- secret_key
- access_key
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
minio1-data:
minio2-data:
minio3-data:
minio4-data:
networks:
minio_distributed:
driver: overlay
configs:
lb.conf:
external: true
secrets:
secret_key:
external: true
access_key:
external: true