juanmaia

docker-swarmpit.yml

Jul 3rd, 2020
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3.3'
  2.  
  3. services:
  4. app:
  5. image: swarmpit/swarmpit:latest
  6. environment:
  7. - SWARMPIT_DB=http://db:5984
  8. volumes:
  9. - /var/run/docker.sock:/var/run/docker.sock:ro
  10. ports:
  11. - 8080:8080
  12. networks:
  13. - swarmpit-net
  14. - swarmlet-network
  15. - traefik-public
  16. deploy:
  17. resources:
  18. limits:
  19. cpus: '0.50'
  20. memory: 1024M
  21. placement:
  22. constraints:
  23. - node.role == manager
  24. labels:
  25. - traefik.frontend.rule=Host:swarmpit.${DOMAIN}
  26. - traefik.enable=true
  27. - traefik.port=8080
  28. - traefik.tags=traefik-public
  29. - traefik.docker.network=traefik-public
  30. # Traefik service that listens to HTTP
  31. - traefik.redirectorservice.frontend.entryPoints=http
  32. - traefik.redirectorservice.frontend.redirect.entryPoint=https
  33. # Traefik service that listens to HTTPS
  34. - traefik.webservice.frontend.entryPoints=https
  35.  
  36. db:
  37. image: couchdb:2.3.0
  38. volumes:
  39. - db-data:/opt/couchdb/data
  40. networks:
  41. - swarmpit-net
  42. deploy:
  43. resources:
  44. limits:
  45. cpus: '0.30'
  46. memory: 512M
  47. placement:
  48. constraints:
  49. - node.labels.swarmpit.db-data == true
  50.  
  51. agent:
  52. image: swarmpit/agent:latest
  53. environment:
  54. - DOCKER_API_VERSION=1.40
  55. volumes:
  56. - /var/run/docker.sock:/var/run/docker.sock
  57. networks:
  58. - swarmpit-net
  59. - swarmlet-network
  60. deploy:
  61. mode: global
  62. resources:
  63. limits:
  64. cpus: '0.10'
  65. memory: 64M
  66. reservations:
  67. cpus: '0.05'
  68. memory: 32M
RAW Paste Data