github.com/olljanat/moby@v1.13.1/docs/reference/commandline/stack_deploy.md (about)

     1  ---
     2  title: "stack deploy"
     3  description: "The stack deploy command description and usage"
     4  keywords: "stack, deploy, up"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # stack deploy
    17  
    18  ```markdown
    19  Usage:  docker stack deploy [OPTIONS] STACK
    20  
    21  Deploy a new stack or update an existing stack
    22  
    23  Aliases:
    24    deploy, up
    25  
    26  Options:
    27        --bundle-file string    Path to a Distributed Application Bundle file
    28    -c, --compose-file string   Path to a Compose file
    29        --help                  Print usage
    30        --with-registry-auth    Send registry authentication details to Swarm agents
    31  ```
    32  
    33  Create and update a stack from a `compose` or a `dab` file on the swarm. This command
    34  has to be run targeting a manager node.
    35  
    36  ## Compose file
    37  
    38  The `deploy` command supports compose file version `3.0` and above."
    39  
    40  ```bash
    41  $ docker stack deploy --compose-file docker-compose.yml vossibility
    42  Ignoring unsupported options: links
    43  
    44  Creating network vossibility_vossibility
    45  Creating network vossibility_default
    46  Creating service vossibility_nsqd
    47  Creating service vossibility_logstash
    48  Creating service vossibility_elasticsearch
    49  Creating service vossibility_kibana
    50  Creating service vossibility_ghollector
    51  Creating service vossibility_lookupd
    52  ```
    53  
    54  You can verify that the services were correctly created
    55  
    56  ```
    57  $ docker service ls
    58  ID            NAME                               MODE        REPLICAS  IMAGE
    59  29bv0vnlm903  vossibility_lookupd                replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    60  4awt47624qwh  vossibility_nsqd                   replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    61  4tjx9biia6fs  vossibility_elasticsearch          replicated  1/1       elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
    62  7563uuzr9eys  vossibility_kibana                 replicated  1/1       kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
    63  9gc5m4met4he  vossibility_logstash               replicated  1/1       logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
    64  axqh55ipl40h  vossibility_vossibility-collector  replicated  1/1       icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
    65  ```
    66  
    67  ## DAB file
    68  
    69  ```bash
    70  $ docker stack deploy --bundle-file vossibility-stack.dab vossibility
    71  Loading bundle from vossibility-stack.dab
    72  Creating service vossibility_elasticsearch
    73  Creating service vossibility_kibana
    74  Creating service vossibility_logstash
    75  Creating service vossibility_lookupd
    76  Creating service vossibility_nsqd
    77  Creating service vossibility_vossibility-collector
    78  ```
    79  
    80  You can verify that the services were correctly created:
    81  
    82  ```bash
    83  $ docker service ls
    84  ID            NAME                               MODE        REPLICAS  IMAGE
    85  29bv0vnlm903  vossibility_lookupd                replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    86  4awt47624qwh  vossibility_nsqd                   replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    87  4tjx9biia6fs  vossibility_elasticsearch          replicated  1/1       elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
    88  7563uuzr9eys  vossibility_kibana                 replicated  1/1       kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
    89  9gc5m4met4he  vossibility_logstash               replicated  1/1       logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
    90  axqh55ipl40h  vossibility_vossibility-collector  replicated  1/1       icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
    91  ```
    92  
    93  ## Related information
    94  
    95  * [stack ls](stack_ls.md)
    96  * [stack ps](stack_ps.md)
    97  * [stack rm](stack_rm.md)
    98  * [stack services](stack_services.md)