Guest User

Untitled

a guest
Feb 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. version: "3"
  2. services:
  3.  
  4. redis:
  5. image: redis:alpine
  6. ports:
  7. - "6379"
  8. networks:
  9. - frontend
  10. deploy:
  11. replicas: 2
  12. update_config:
  13. parallelism: 2
  14. delay: 10s
  15. restart_policy:
  16. condition: on-failure
  17. db:
  18. image: postgres:9.4
  19. volumes:
  20. - db-data:/var/lib/postgresql/data
  21. networks:
  22. - backend
  23. deploy:
  24. placement:
  25. constraints: [node.role == manager]
  26. vote:
  27. image: dockersamples/examplevotingapp_vote:before
  28. ports:
  29. - 5000:80
  30. networks:
  31. - frontend
  32. depends_on:
  33. - redis
  34. deploy:
  35. replicas: 2
  36. update_config:
  37. parallelism: 2
  38. restart_policy:
  39. condition: on-failure
  40. result:
  41. image: dockersamples/examplevotingapp_result:before
  42. ports:
  43. - 5001:80
  44. networks:
  45. - backend
  46. depends_on:
  47. - db
  48. deploy:
  49. replicas: 1
  50. update_config:
  51. parallelism: 2
  52. delay: 10s
  53. restart_policy:
  54. condition: on-failure
  55.  
  56. worker:
  57. image: dockersamples/examplevotingapp_worker
  58. networks:
  59. - frontend
  60. - backend
  61. deploy:
  62. mode: replicated
  63. replicas: 1
  64. labels: [APP=VOTING]
  65. restart_policy:
  66. condition: on-failure
  67. delay: 10s
  68. max_attempts: 3
  69. window: 120s
  70. placement:
  71. constraints: [node.role == manager]
  72.  
  73. visualizer:
  74. image: dockersamples/visualizer
  75. ports:
  76. - "8080:8080"
  77. stop_grace_period: 1m30s
  78. volumes:
  79. - /var/run/docker.sock:/var/run/docker.sock
  80. deploy:
  81. placement:
  82. constraints: [node.role == manager]
  83.  
  84. networks:
  85. frontend:
  86. backend:
  87.  
  88. volumes:
  89. db-data:
Add Comment
Please, Sign In to add comment