rocketchat
Este commit está contenido en:
128
production/rocket/docker-compose.yml
Archivo normal
128
production/rocket/docker-compose.yml
Archivo normal
@@ -0,0 +1,128 @@
|
||||
version: '2'
|
||||
services:
|
||||
db-rocketchat1:
|
||||
image: mongo
|
||||
restart: always
|
||||
container_name: db-rocketchat1
|
||||
hostname: db-rocketchat1
|
||||
command: --keyFile /opt/keyfile --replSet "rs0"
|
||||
volumes:
|
||||
- ./mongo/data1:/data/db
|
||||
- ./mongo/mongodb-keyfile:/opt/keyfile
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.133.0.99
|
||||
|
||||
db-rocketchat2:
|
||||
image: mongo
|
||||
restart: always
|
||||
container_name: db-rocketchat2
|
||||
hostname: db-rocketchat2
|
||||
command: --keyFile /opt/keyfile --replSet "rs0"
|
||||
volumes:
|
||||
- ./mongo/data2:/data/db
|
||||
- ./mongo/mongodb-keyfile:/opt/keyfile
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.133.0.100
|
||||
|
||||
rocketchat:
|
||||
image: rocket.chat
|
||||
# build: ./rocketchat
|
||||
restart: always
|
||||
container_name: rocketchat
|
||||
hostname: rocketchat
|
||||
extra_hosts:
|
||||
- "rocketchat:172.133.0.101"
|
||||
- "rocketchat:172.200.0.2"
|
||||
- "smtp.hatthieves.es:172.200.0.101"
|
||||
# entrypoint:
|
||||
# - /bin/bash
|
||||
# - /entrypoint.sh
|
||||
environment:
|
||||
- MONGO_URL=mongodb://db-rocketchat1:27017/rocketchat
|
||||
- ROOT_URL=https://talk.hatthieves.es
|
||||
- PORT=3000
|
||||
- MAIL_URL=smtp.hatthieves.es
|
||||
- Accounts_UseDNSDomainCheck=False
|
||||
- NODE_ENV=production
|
||||
- Accounts_AvatarStorePath=/app/uploads
|
||||
- MONGO_URL=mongodb://rocket:p4ssw0rd@db-rocketchat1:27017,db-rocketchat2:27017/rocketchat?authSource=admin&replicaSet=rs0&readPreference=nearest&w=majority
|
||||
- MONGO_OPLOG_URL=mongodb://oploguser:p4ssw0rd@db-rocketchat1:27017,db-rocketchat2:27017/local?authSource=admin&replicaSet=rs0
|
||||
- INSTANCE_IP=172.133.0.101
|
||||
volumes:
|
||||
# - ./rocketchat/entrypoint.sh:/entrypoint.sh:ro
|
||||
- ./rocketchat/uploads:/app/uploads
|
||||
# - ./rocketchat/turnserver.conf:/etc/turnserver.conf:ro
|
||||
# - ./rocketchat/coturn:/etc/default/coturn:ro
|
||||
# - /opt/docker/secure/privkey.pem:/etc/turn_server_pkey.pem:ro
|
||||
# - /opt/docker/secure/fullchain.pem:/etc/turn_server_cert.pem:ro
|
||||
links:
|
||||
- db-rocketchat1:db-rocketchat1
|
||||
- db-rocketchat2:db-rocketchat2
|
||||
depends_on:
|
||||
- db-rocketchat1
|
||||
- db-rocketchat2
|
||||
expose:
|
||||
- 3000
|
||||
# ports:
|
||||
# - 3478:3478/tcp
|
||||
# - 3478:3478/udp
|
||||
# - 5349:5349/tcp
|
||||
# - 5349:5349/udp
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.133.0.101
|
||||
wildduck:
|
||||
|
||||
hubot:
|
||||
build: ./hubot
|
||||
restart: always
|
||||
container_name: hubot
|
||||
hostname: hubot
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
- /entrypoint.sh
|
||||
# environment:
|
||||
# - ROCKETCHAT_URL=https://talk.hatthieves.es
|
||||
# - ROCKETCHAT_ROOM=''
|
||||
# - ROCKETCHAT_USER=rocketbot
|
||||
# - ROCKETCHAT_PASSWORD=vL6atw8ynmcErpagZ
|
||||
# - BOT_NAME=RocketBot
|
||||
# - LISTEN_ON_ALL_PUBLIC=true
|
||||
# - ROCKETCHAT_AUTH=password
|
||||
# - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-greetings
|
||||
# - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnostics,hubot-google,hubot-reddit,hubot-bofh,hubot-bookmark,hubot-shipit,hubot-maps,hubot-pugme
|
||||
volumes:
|
||||
- ./hubot/entrypoint.sh:/entrypoint.sh
|
||||
links:
|
||||
- rocketchat:rocketchat
|
||||
# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier
|
||||
expose:
|
||||
- 3001
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.133.0.102
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
hostname: redis-rocketchat
|
||||
container_name: redis-rocketchat
|
||||
restart: always
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
expose:
|
||||
- 6379
|
||||
networks:
|
||||
mynet:
|
||||
ipv4_address: 172.133.0.103
|
||||
|
||||
networks:
|
||||
mynet:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.133.0.0/24
|
||||
wildduck:
|
||||
external:
|
||||
name: harakawildduck_mynet
|
||||
59
production/rocket/hubot/Dockerfile
Archivo normal
59
production/rocket/hubot/Dockerfile
Archivo normal
@@ -0,0 +1,59 @@
|
||||
FROM node:10-slim
|
||||
RUN apt update && apt -y upgrade && apt -y install git sudo python build-essential && apt clean
|
||||
RUN mkdir -p /hubot/scripts
|
||||
RUN useradd -ms /bin/bash hubot
|
||||
RUN chown hubot.hubot -R /hubot
|
||||
WORKDIR /hubot
|
||||
USER hubot
|
||||
RUN npm install --single-threaded \
|
||||
coffeescript \
|
||||
yo \
|
||||
generator-hubot \
|
||||
hubot
|
||||
RUN node node_modules/.bin/yo hubot --owner="No owner specified" --name="rocketbot" --description="Hubot with rocketbot adapter" --defaults
|
||||
RUN npm install --single-threaded \
|
||||
hubot-scripts \
|
||||
hubot-rocketchat \
|
||||
hubot-help \
|
||||
hubot-seen \
|
||||
hubot-links \
|
||||
hubot-phrases \
|
||||
hubot-putear \
|
||||
hubot-country \
|
||||
hubot-morse \
|
||||
hubot-fun \
|
||||
hubot-pony \
|
||||
hubot-suggest \
|
||||
hubot-url-title \
|
||||
hubot-current-time \
|
||||
hubot-lmgtfy \
|
||||
hubot-thesimpsons \
|
||||
hubot-victory \
|
||||
hubot-plusplus \
|
||||
hubot-diagnostics \
|
||||
hubot-anon \
|
||||
hubot-anime-dl \
|
||||
hubot-taboo-topics \
|
||||
hubot-pugme \
|
||||
hubot-maps \
|
||||
hubot-rules \
|
||||
hubot-shipit \
|
||||
hubot-motivate \
|
||||
hubot-encourage \
|
||||
hubot-ascii-art \
|
||||
hubot-wikipedia-lang \
|
||||
hubot-markov \
|
||||
hubot-brain-inspect \
|
||||
hubot-qr-generator
|
||||
RUN npm install --single-threaded
|
||||
RUN cp -r node_modules/hubot-* scripts/
|
||||
ADD ./external-scripts.json /external-scripts.json
|
||||
RUN cp /external-scripts.json /hubot/external-scripts.json
|
||||
ENV ROCKETCHAT_URL http://172.133.0.101:3000
|
||||
ENV ROCKETCHAT_ROOM general
|
||||
ENV ROCKETCHAT_USER rocketbot
|
||||
ENV ROCKETCHAT_PASSWORD RbwX6hrPPpjgdBaCX
|
||||
ENV BOT_NAME RocketBot
|
||||
#ENV LISTEN_ON_ALL_PUBLIC true
|
||||
ENV ROCKETCHAT_AUTH password
|
||||
ENV REDIS_URL redis://172.133.0.103:6379/rocketchat
|
||||
3
production/rocket/hubot/entrypoint.sh
Archivo normal
3
production/rocket/hubot/entrypoint.sh
Archivo normal
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
sleep 120s
|
||||
node node_modules/.bin/coffee node_modules/.bin/hubot --name rocketbot -n RocketBot -a rocketchat
|
||||
33
production/rocket/hubot/external-scripts.json
Archivo normal
33
production/rocket/hubot/external-scripts.json
Archivo normal
@@ -0,0 +1,33 @@
|
||||
[
|
||||
"hubot-help",
|
||||
"hubot-redis-brain",
|
||||
"hubot-seen",
|
||||
"hubot-links",
|
||||
"hubot-putear",
|
||||
"hubot-country",
|
||||
"hubot-morse",
|
||||
"hubot-fun",
|
||||
"hubot-pony",
|
||||
"hubot-diagnostics",
|
||||
"hubot-pugme",
|
||||
"hubot-maps",
|
||||
"hubot-rules",
|
||||
"hubot-shipit",
|
||||
"hubot-suggest",
|
||||
"hubot-url-title",
|
||||
"hubot-current-time",
|
||||
"hubot-lmgtfy",
|
||||
"hubot-thesimpsons",
|
||||
"hubot-victory",
|
||||
"hubot-plusplus",
|
||||
"hubot-motivate",
|
||||
"hubot-encourage",
|
||||
"hubot-anon",
|
||||
"hubot-anime-dl",
|
||||
"hubot-taboo-topics",
|
||||
"hubot-ascii-art",
|
||||
"hubot-wikipedia-lang",
|
||||
"hubot-markov",
|
||||
"hubot-brain-inspect",
|
||||
"hubot-qr-generator"
|
||||
]
|
||||
19
production/rocket/rocketchat/Dockerfile
Archivo normal
19
production/rocket/rocketchat/Dockerfile
Archivo normal
@@ -0,0 +1,19 @@
|
||||
FROM node:12-slim
|
||||
ENV VERSION latest
|
||||
RUN apt update && apt -y upgrade && apt -y install \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
rsync \
|
||||
git \
|
||||
xz-utils \
|
||||
ca-certificates \
|
||||
procps \
|
||||
python \
|
||||
&& apt clean
|
||||
WORKDIR /home/node
|
||||
USER node
|
||||
RUN wget -q https://releases.rocket.chat/$VERSION/download && tar -zxf download && rm download
|
||||
WORKDIR /home/node/bundle/programs/server
|
||||
RUN npm install && mkdir /home/node/uploads
|
||||
WORKDIR /home/node/bundle
|
||||
11
production/rocket/rocketchat/entrypoint.sh
Archivo normal
11
production/rocket/rocketchat/entrypoint.sh
Archivo normal
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
export ROOT_URL="https://talk.hatthieves.es"
|
||||
export PORT=3000
|
||||
export MAIL_URL="smtp.hatthieves.es"
|
||||
export Accounts_UseDNSDomainCheck="False"
|
||||
export NODE_ENV="production"
|
||||
export Accounts_AvatarStorePath="/home/rocketchat/uploads"
|
||||
export MONGO_URL="mongodb://rocket:p4%24%24w0rd@db-rocketchat1:27017,db-rocketchat2:27017/rocketchat?authSource=admin&replicaSet=rs0&readPreference=nearest&w=majority"
|
||||
export MONGO_OPLOG_URL="mongodb://oploguser:p4%24%24w0rd@db-rocketchat1:27017,db-rocketchat2:27017/local?authSource=admin&replicaSet=rs0"
|
||||
export INSTANCE_IP="172.133.0.101"
|
||||
node main.js
|
||||
Referencia en una nueva incidencia
Block a user