Skip to content

how to set the service mode when using docker compose bundel on 1.12 #3743

Closed

Description

@Richard-Mathie

How do we set the service mode to global for a service when are using docker-compose bundle for docker 1.12.

It seems there is no documentation on how/where to do this in the compose file. Is it even possible.

Activity

  1. aanand commented on Jul 20, 2016

    @aanand

    It's not currently possible. I don't think the service mode belongs in the bundle - it's an environment-specific concern.

  2. Richard-Mathie commented on Jul 21, 2016

    @Richard-Mathie
    Author

    so is there no way to set the replication strategy in the bundle (dab) file. This seems a bit of an omission to me as you may have wanted to deploy a stack which has say:

    • a monitoring container on each node (seamtext),
    • front end containers on the public nodes
    • back end containers (db, RPC) on the private nodes

    I thought the .dab file was the equivalent configuration for services that docker-compose.yml files is for containers. Therefor we should be able to configure every service in the .dab in exactly the same way we can configure the service in docker service create. Else what is the point? I will have to deploy the bundle as a stack and then configure each service in the stack with docker service update.

  3. aanand commented on Jul 21, 2016

    @aanand

    I will have to deploy the bundle as a stack and then configure each service in the stack with docker service update.

    Correct, but this is a temporary situation. Eventually there'll be a secondary file format for supplying environment-specific configuration, which is where replication strategies will go - alongside port mappings, mounts, and other non-portable configuration.

  4. euforia commented on Aug 26, 2016

    @euforia

    Can the mode be specified when NOT using a bundle? i.e. In a standard version 2 docker-compose format.

  5. pcornelissen commented on Oct 10, 2016

    @pcornelissen

    Right now there seems to be a rather strange mix of things that can or cannot be expressed using docker-compose files...
    I can use affinity to say that I want each instance on another host, but I can't use the global service mode.
    Then I can set the scale via command line of docker compose, but not via the config file.

    Sorry this is a mess and why shouldn't we be allowed to set these values in a config file?
    There are easy ways to parametrize that or use override configs that are environment specific.

    Now we are forced to use a mix of calls of docker, docker-compose and settings in the config file to have the desired effects...

  6. viveky4d4v commented on Oct 27, 2016

    @viveky4d4v

    Any chance we can use this in compose file ?
    I have a requirement where for a service there should be exactly one container on every node/host .

    This doesn't happen with "spread strategy" of swarm if a node goes down & comes up , it just attains the equal number of containers on each host irrespective of services .

  7. stale commented on Oct 10, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  8. stale commented on Oct 17, 2019

    @stale

    This issue has been automatically closed because it had not recent activity during the stale period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions