SHARE
TWEET

docker-compose.yml

tiagochaves Apr 23rd, 2019 82 in 147 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3'
  2.  
  3. services:
  4.   mongo:
  5.     image: mongo:3.6
  6.     command: mongod --replSet rs0
  7.     volumes:
  8.      - /mnt/docker_store/mongo-server/datadir:/data/db
  9.     ports:
  10.      - 27017
  11.     environment:
  12.      - SERVICE_PORTS=27017
  13.     deploy:
  14.       replicas: 10
  15.       update_config:
  16.         parallelism: 5
  17.         delay: 10s
  18.       restart_policy:
  19.         condition: on-failure
  20.         max_attempts: 3
  21.         window: 120s
  22.     networks:
  23.      - w2q_network
  24.   proxy:
  25.     image: dockercloud/haproxy:latest
  26.     depends_on:
  27.      - mongo
  28.     environment:
  29.      - BALANCE=leastconn
  30.     volumes:
  31.      - /var/run/docker.sock:/var/run/docker.sock
  32.     ports:
  33.      - 27017:27017
  34.     networks:
  35.      - w2q_network
  36.     deploy:
  37.       placement:
  38.         constraints: [node.role == manager]
  39.  
  40. networks:
  41.   w2q_network:
  42.     driver: overlay
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top