Advertisement
jfnredes

Untitled

Dec 21st, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. version: "3.3"
  2. services:
  3. redis:
  4. image: redis:alpine
  5. ports:
  6. - "6379"
  7. networks:
  8. - frontend
  9. deploy:
  10. replicas: 2
  11. update_config:
  12. parallelism: 1
  13. delay: 10s
  14. restart_policy:
  15. condition: on-failure
  16. db:
  17. image: postgres:9.4
  18. volumes:
  19. - db-data:/var/lib/postgresql/data
  20. networks:
  21. - backend
  22. deploy:
  23. placement:
  24. constraints: [node.role == manager]
  25. vote:
  26. image: dockersamples/examplevotingapp_vote:before
  27. ports:
  28. - 5000:80
  29. networks:
  30. - frontend
  31. depends_on:
  32. - redis
  33. deploy:
  34. replicas: 2
  35. update_config:
  36. parallelism: 2
  37. restart_policy:
  38. condition: on-failure
  39. result:
  40. image: dockersamples/examplevotingapp_result:before
  41. ports:
  42. - 5001:80
  43. networks:
  44. - backend
  45. depends_on:
  46. - db
  47. deploy:
  48. replicas: 1
  49. update_config:
  50. parallelism: 1
  51. delay: 10s
  52. restart_policy:
  53. condition: on-failure
  54. worker:
  55. image: dockersamples/examplevotingapp_worker
  56. networks:
  57. - frontend
  58. - backend
  59. deploy:
  60. mode: replicated
  61. replicas: 1
  62. labels: [APP=VOTING]
  63. restart_policy:
  64. condition: on-failure
  65. delay: 10s
  66. max_attempts: 3
  67. window: 120s
  68. placement:
  69. constraints: [node.role == manager]
  70. visualizer:
  71. image: dockersamples/visualizer:stable
  72. ports:
  73. - "8080:8080"
  74. volumes:
  75. - "/var/run/docker.sock:/var/run/docker.sock"
  76. deploy:
  77. placement:
  78. constraints: [node.role == manager]
  79. networks:
  80. frontend:
  81. backend:
  82. volumes:
  83. db-data:
  84. root@fsociety01:~/Composes/4#
  85. root@fsociety01:~/Composes/4#
  86. root@fsociety01:~/Composes/4#
  87. root@fsociety01:~/Composes/4#
  88. root@fsociety01:~/Composes/4#
  89. root@fsociety01:~/Composes/4#
  90. root@fsociety01:~/Composes/4# cat docker-compose.yml
  91. version: "3.3"
  92. services:
  93. redis:
  94. image: redis:alpine
  95. ports:
  96. - "6379"
  97. networks:
  98. - frontend
  99. deploy:
  100. replicas: 2
  101. update_config:
  102. parallelism: 1
  103. delay: 10s
  104. restart_policy:
  105. condition: on-failure
  106. db:
  107. image: postgres:9.4
  108. volumes:
  109. - db-data:/var/lib/postgresql/data
  110. networks:
  111. - backend
  112. deploy:
  113. placement:
  114. constraints: [node.role == manager]
  115. vote:
  116. image: dockersamples/examplevotingapp_vote:before
  117. ports:
  118. - 5000:80
  119. networks:
  120. - frontend
  121. depends_on:
  122. - redis
  123. deploy:
  124. replicas: 2
  125. update_config:
  126. parallelism: 2
  127. restart_policy:
  128. condition: on-failure
  129. result:
  130. image: dockersamples/examplevotingapp_result:before
  131. ports:
  132. - 5001:80
  133. networks:
  134. - backend
  135. depends_on:
  136. - db
  137. deploy:
  138. replicas: 1
  139. update_config:
  140. parallelism: 1
  141. delay: 10s
  142. restart_policy:
  143. condition: on-failure
  144. worker:
  145. image: dockersamples/examplevotingapp_worker
  146. networks:
  147. - frontend
  148. - backend
  149. deploy:
  150. mode: replicated
  151. replicas: 1
  152. labels: [APP=VOTING]
  153. restart_policy:
  154. condition: on-failure
  155. delay: 10s
  156. max_attempts: 3
  157. window: 120s
  158. placement:
  159. constraints: [node.role == manager]
  160. visualizer:
  161. image: dockersamples/visualizer:stable
  162. ports:
  163. - "8080:8080"
  164. volumes:
  165. - "/var/run/docker.sock:/var/run/docker.sock"
  166. deploy:
  167. placement:
  168. constraints: [node.role == manager]
  169. networks:
  170. frontend:
  171. backend:
  172. volumes:
  173. db-data:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement