Advertisement
Guest User

Untitled

a guest
May 2nd, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. version: '2'
  2.  
  3. services:
  4. rocketchat:
  5. image: rocketchat/rocket.chat:latest
  6. command: bash -c 'for i in `seq 1 30`; do node main.js && s=$$? && break || s=$$?; echo "Tried $$i times. Waiting 5 secs..."; sleep 5; done; (exit $$s)'
  7. restart: unless-stopped
  8. volumes:
  9. - ./uploads:/app/uploads
  10. environment:
  11. - PORT=3000
  12. - ROOT_URL=http://localhost:3000
  13. - MONGO_URL=mongodb://mongo:27017/rocketchat
  14. - MONGO_OPLOG_URL=mongodb://mongo:27017/local
  15. - MAIL_URL=smtp://smtp.email
  16. # - HTTP_PROXY=http://proxy.domain.com
  17. # - HTTPS_PROXY=http://proxy.domain.com
  18. depends_on:
  19. - mongo
  20. ports:
  21. - 3000:3000
  22. labels:
  23. - "traefik.backend=rocketchat"
  24. - "traefik.frontend.rule=Host: your.domain.tld"
  25.  
  26. mongo:
  27. image: mongo:4.0
  28. restart: unless-stopped
  29. volumes:
  30. - ./data/db:/data/db
  31. #- ./data/dump:/dump
  32. command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
  33. labels:
  34. - "traefik.enable=false"
  35.  
  36. # this container's job is just run the command to initialize the replica set.
  37. # it will run the command and remove himself (it will not stay running)
  38. mongo-init-replica:
  39. image: mongo:4.0
  40. command: 'bash -c "for i in `seq 1 30`; do mongo mongo/rocketchat --eval \"rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})\" && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)"'
  41. depends_on:
  42. - mongo
  43.  
  44. # hubot, the popular chatbot (add the bot user first and change the password before starting this image)
  45. hubot:
  46. image: rocketchat/hubot-rocketchat:latest
  47. restart: unless-stopped
  48. environment:
  49. - ROCKETCHAT_URL=rocketchat:3000
  50. - ROCKETCHAT_ROOM=GENERAL
  51. - ROCKETCHAT_USER=bot
  52. - ROCKETCHAT_PASSWORD=botpassword
  53. - BOT_NAME=bot
  54. # you can add more scripts as you'd like here, they need to be installable by npm
  55. - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics
  56. depends_on:
  57. - rocketchat
  58. labels:
  59. - "traefik.enable=false"
  60. volumes:
  61. - ./scripts:/home/hubot/scripts
  62. # this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier
  63. ports:
  64. - 3001:8080
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement