mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-03 18:36:22 +00:00
refactored all to dev
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
###############################################################################
|
||||
# Rocket Chat
|
||||
# Update the .env file
|
||||
# make sure you use the $PREFIX from .env for project_name
|
||||
# docker-compose -p project_name up -d
|
||||
###############################################################################
|
||||
|
||||
volumes:
|
||||
rocketchat:
|
||||
rocketchat-db:
|
||||
rocketchat-dump:
|
||||
rocketchat-scripts:
|
||||
|
||||
services:
|
||||
rocketchat:
|
||||
image: rocketchat/rocket.chat:latest
|
||||
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:
|
||||
- rocketchat:/app/uploads
|
||||
networks:
|
||||
- admin_web
|
||||
environment:
|
||||
- PORT=3000
|
||||
- ROOT_URL=http://${ROCKET_DOMAIN_NAME}:3000
|
||||
- MONGO_URL=mongodb://${PREFIX}_mongo_1:27017/rocketchat
|
||||
- MONGO_OPLOG_URL=mongodb://${PREFIX}_mongo_1:27017/local
|
||||
- MAIL_URL=smtp://smtp.email
|
||||
# - HTTP_PROXY=http://proxy.domain.com
|
||||
# - HTTPS_PROXY=http://proxy.domain.com
|
||||
depends_on:
|
||||
- mongo
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${PREFIX}_chat.rule=Host(`${ROCKET_DOMAIN_NAME}`)"
|
||||
- "traefik.http.routers.${PREFIX}_chat.entrypoints=websecure"
|
||||
- "traefik.http.routers.${PREFIX}_chat.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.${PREFIX}_chat.loadbalancer.server.port=3000"
|
||||
|
||||
mongo:
|
||||
image: mongo:4.0
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- rocketchat-db:/data/db
|
||||
- rocketchat-dump:/dump
|
||||
networks:
|
||||
- admin_web
|
||||
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
|
||||
|
||||
mongo-init-replica:
|
||||
image: mongo:4.0
|
||||
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)"
|
||||
depends_on:
|
||||
- mongo
|
||||
networks:
|
||||
- admin_web
|
||||
|
||||
# hubot, the popular chatbot (add the bot user first and change the password before starting this image)
|
||||
hubot:
|
||||
image: rocketchat/hubot-rocketchat:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ROCKETCHAT_URL=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
|
||||
volumes:
|
||||
- rocketchat-scripts:/home/hubot/scripts
|
||||
networks:
|
||||
- admin_web
|
||||
@@ -0,0 +1,6 @@
|
||||
# Domains & Project
|
||||
PREFIX=p1
|
||||
ROCKET_DOMAIN_NAME=chat.nickyeoman.com
|
||||
|
||||
# Software versions
|
||||
ROCKETCHAT_V=3.1.1
|
||||
Reference in New Issue
Block a user