You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
3.9 KiB

5 years ago
version: "3.4"
services:
minio1:
image: minio/minio:RELEASE.2020-04-10T03-34-42Z
hostname: minio1
volumes:
- minio1b-data:/export
ports:
- "9001:9000"
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-04-10T03-34-42Z
hostname: minio2
volumes:
- minio2b-data:/export
ports:
- "9002:9000"
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-04-10T03-34-42Z
hostname: minio3
volumes:
- minio3b-data:/export
ports:
- "9003:9000"
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-04-10T03-34-42Z
hostname: minio4
volumes:
- minio4b-data:/export
ports:
- "9004:9000"
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
web:
image: nginx:1.17.9-alpine
depends_on:
- minio1
deploy:
mode: replicated
restart_policy:
delay: 10s
max_attempts: 10
window: 60s
replicas: 2
placement:
# max_replicas_per_node: 1
constraints:
- node.labels.group==minio
ports:
- "8080:80"
- "9443:443"
volumes:
- /home/user/minio/minio.conf:/etc/nginx/conf.d/default.conf
- /home/user/minio/public.crt:/etc/nginx/public.crt
- /home/user/minio/private.key:/etc/nginx/private.key
networks:
- minio_distributed
environment:
- MINIO_MIRROR_PARAMETERS= --delete
- MINIO_SERVER_URL=83.212.77.30:9443
- MINIO_PROT=https
- MINIO_SERVER_DOCUMENTROOT=/home/user/docker_node_image/localdir
- MINIO_ACCESS_KEY=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- MINIO_SECRET_KEY=e5ed1e5812522fcfe0624c75e20ebe9f72435855e4ef26c1f3b018918744e1a1
- MINIO_WEB_BUCKET=nodebucket
- MINIO_WEB_PASS=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- AWS_CONFIG_FILE=/home/user/aws/config
- AWS_ACCESS_KEY_ID=d4bb2d45395befe5f29f54a9c219a2559ee1bfaab64fce897001c209a52516f4
- AWS_SECRET_ACCESS_KEY=e5ed1e5812522fcfe0624c75e20ebe9f72435855e4ef26c1f3b018918744e1a1
volumes:
minio1b-data:
minio2b-data:
minio3b-data:
minio4b-data:
networks:
minio_distributed:
driver: overlay
secrets:
secret_key:
external: true
access_key:
external: true