7,540
edits
Changes
Docker
,→swarm
=== swarm ===
* '''deploy''': This only takes effect when deploying to a swarm with docker stack deploy, and is ignored by docker-compose up and docker-compose run.** '''ENDPOINT_MODE''': *** vip: (default): Single Virtual IP for the service. Swarm is load balancing *** dnsrr: (DNS round rubin): DNS query gives the list of the nodes for our own load balancing. ** '''MODE''': Either global (exactly one container per swarm node) or replicated (a specified number of containers)** '''PLACEMENT''': ** '''REPLICAS''': If the service is replicated (which is the default), specify the number of containers that should be running at any given time.** '''RESOURCES'''** '''RESTART_POLICY''':<pre>version: '3'services: redis: image: redis:alpine deploy: replicas: 6 update_config: parallelism: 2 delay: 10s restart_policy: condition: on-failure resources: limits: cpus: '0.50' memory: 50M reservations: cpus: '0.25' memory: 20M restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s</pre>
<br>