You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.6 KiB

version: '3.3'
services:
rocketchat:
#image: registry.rocket.chat/rocketchat/rocket.chat:4.2.0
image: hub.swarmlab.io:5480/poc-rocketchat
container_name: ${SWARMLAB_ROCKET}_rocketchat
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)"
restart: unless-stopped
volumes:
- ./uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=http://localhost:7030
- MONGO_URL=mongodb://poc-rocketchat_mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://poc-rocketchat_mongo:27017/local
- BYPASS_MONGO_VALIDATION=true
# - MAIL_URL=smtp://smtp.email
# - HTTP_PROXY=http://proxy.domain.com
# - HTTPS_PROXY=http://proxy.domain.com
#depends_on:
#- mongo
ports:
- 7030:3000
networks:
rocketchat-net:
labels:
- "traefik.backend=rocketchat"
- "traefik.frontend.rule=Host: your.domain.tld"
mongo:
image: mongo:4.0
container_name: ${SWARMLAB_ROCKET}_mongo
restart: unless-stopped
volumes:
- ./dbrocketchat/db:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
labels:
- "traefik.enable=false"
networks:
rocketchat-net:
# this container's job is just run the command to initialize the replica set.
# it will run the command and remove himself (it will not stay running)
mongo-init-replica:
image: mongo:4.0
networks:
rocketchat-net:
command: >
bash -c
"for i in `seq 1 30`; do
mongo poc-rocketcha_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)"
#depends_on:
#- mongo
# hubot, the popular chatbot (add the bot user first and change the password before starting this image)
hubot:
#image: rocketchat/hubot-rocketchat:latest
image: hub.swarmlab.io:5480/poc-hubotrocketchat
container_name: ${SWARMLAB_ROCKET}_hubot
restart: unless-stopped
environment:
- ROCKETCHAT_URL=poc-rocketchat_rocketchat:3000
- ROCKETCHAT_ROOM=GENERAL
- ROCKETCHAT_USER=bot
- ROCKETCHAT_PASSWORD=botpassword
- BOT_NAME=bot
# you can add more scripts as you'd like here, they need to be installable by npm
- EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics
#depends_on:
#- rocketchat
labels:
- "traefik.enable=false"
volumes:
- ./scripts:/home/hubot/scripts
# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier
ports:
- 3001:8080
networks:
rocketchat-net:
#traefik:
# image: traefik:latest
# restart: unless-stopped
# command: >
# traefik
# --docker
# --acme=true
# --acme.domains='your.domain.tld'
# --acme.email='your@email.tld'
# --acme.entrypoint=https
# --acme.storagefile=acme.json
# --defaultentrypoints=http
# --defaultentrypoints=https
# --entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
# --entryPoints='Name:https Address::443 TLS.Certificates:'
# ports:
# - 80:80
# - 443:443
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
networks:
rocketchat-net: