storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/docs/orchestration/docker-swarm/docker-compose-secrets.yaml (about)

     1  version: '3.7'
     2  
     3  services:
     4    minio1:
     5      image: minio/minio:RELEASE.2021-04-22T15-44-28Z
     6      hostname: minio1
     7      volumes:
     8        - minio1-data:/export
     9      ports:
    10        - "9001:9000"
    11      networks:
    12        - minio_distributed
    13      deploy:
    14        restart_policy:
    15          delay: 10s
    16          max_attempts: 10
    17          window: 60s
    18        placement:
    19          constraints:
    20            - node.labels.minio1==true
    21      command: server http://minio{1...4}/export
    22      secrets:
    23        - secret_key
    24        - access_key
    25      healthcheck:
    26        test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
    27        interval: 30s
    28        timeout: 20s
    29        retries: 3
    30  
    31    minio2:
    32      image: minio/minio:RELEASE.2021-04-22T15-44-28Z
    33      hostname: minio2
    34      volumes:
    35        - minio2-data:/export
    36      ports:
    37        - "9002:9000"
    38      networks:
    39        - minio_distributed
    40      deploy:
    41        restart_policy:
    42          delay: 10s
    43          max_attempts: 10
    44          window: 60s
    45        placement:
    46          constraints:
    47            - node.labels.minio2==true
    48      command: server http://minio{1...4}/export
    49      secrets:
    50        - secret_key
    51        - access_key
    52      healthcheck:
    53        test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
    54        interval: 30s
    55        timeout: 20s
    56        retries: 3
    57  
    58    minio3:
    59      image: minio/minio:RELEASE.2021-04-22T15-44-28Z
    60      hostname: minio3
    61      volumes:
    62        - minio3-data:/export
    63      ports:
    64        - "9003:9000"
    65      networks:
    66        - minio_distributed
    67      deploy:
    68        restart_policy:
    69          delay: 10s
    70          max_attempts: 10
    71          window: 60s
    72        placement:
    73          constraints:
    74            - node.labels.minio3==true
    75      command: server http://minio{1...4}/export
    76      secrets:
    77        - secret_key
    78        - access_key
    79      healthcheck:
    80        test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
    81        interval: 30s
    82        timeout: 20s
    83        retries: 3
    84  
    85    minio4:
    86      image: minio/minio:RELEASE.2021-04-22T15-44-28Z
    87      hostname: minio4
    88      volumes:
    89        - minio4-data:/export
    90      ports:
    91        - "9004:9000"
    92      networks:
    93        - minio_distributed
    94      deploy:
    95        restart_policy:
    96          delay: 10s
    97          max_attempts: 10
    98          window: 60s
    99        placement:
   100          constraints:
   101            - node.labels.minio4==true
   102      command: server http://minio{1...4}/export
   103      secrets:
   104        - secret_key
   105        - access_key
   106      healthcheck:
   107        test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
   108        interval: 30s
   109        timeout: 20s
   110        retries: 3
   111  
   112  volumes:
   113    minio1-data:
   114  
   115    minio2-data:
   116  
   117    minio3-data:
   118  
   119    minio4-data:
   120  
   121  networks:
   122    minio_distributed:
   123      driver: overlay
   124  
   125  secrets:
   126    secret_key:
   127      external: true
   128    access_key:
   129      external: true