Skip to content

Commit

Permalink
Merge pull request #17240 from RocketChat/release-3.1.0
Browse files Browse the repository at this point in the history
Release 3.1.0
  • Loading branch information
sampaiodiego authored Apr 10, 2020
2 parents 15ac767 + f07507b commit dd9b1a1
Show file tree
Hide file tree
Showing 645 changed files with 23,917 additions and 4,841 deletions.
27 changes: 14 additions & 13 deletions .docker-mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
FROM rocketchat/base:12.14.0
FROM rocketchat/base:12.16.1

ADD . /app
ADD entrypoint.sh /app/bundle/

MAINTAINER buildmaster@rocket.chat
LABEL maintainer="buildmaster@rocket.chat"

RUN set -x \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \
&& apt-get update \
&& apt-get install -y wget \
&& wget -qO - https://www.mongodb.org/static/pgp/server-4.0.asc | apt-key add - \
&& echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list \
&& apt-get update \
&& apt-get install -y --force-yes pwgen mongodb-org \
&& echo "mongodb-org hold" | dpkg --set-selections \
&& echo "mongodb-org-server hold" | dpkg --set-selections \
&& echo "mongodb-org-shell hold" | dpkg --set-selections \
&& echo "mongodb-org-mongos hold" | dpkg --set-selections \
&& echo "mongodb-org-tools hold" | dpkg --set-selections \
&& apt-get install -y pwgen mongodb-org \
&& apt-get clean my room

ADD . /app
ADD entrypoint.sh /app/bundle/

RUN set -x \
&& cd /app/bundle/programs/server \
&& npm install \
&& npm cache clear --force \
&& rm -rf /var/lib/apt/lists/*
&& chown -R rocketchat:rocketchat /app

VOLUME /app/uploads

Expand All @@ -28,6 +28,7 @@ WORKDIR /app/bundle
ENV DEPLOY_METHOD=docker-preview \
NODE_ENV=production \
MONGO_URL=mongodb://localhost:27017/rocketchat \
MONGO_OPLOG_URL=mongodb://localhost:27017/local \
HOME=/tmp \
PORT=3000 \
ROOT_URL=http://localhost:3000 \
Expand Down
25 changes: 23 additions & 2 deletions .docker-mongo/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,32 @@ echo """
╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═══╝ ╚═╝╚══════╝ ╚══╝╚══╝
"""

mongod --smallfiles --storageEngine=mmapv1 --fork --config /etc/mongod.conf
mongod --smallfiles --storageEngine=mmapv1 --fork --replSet rs0 --config /etc/mongod.conf

until mongo --eval "db" &> /dev/null; do
echo "MongoDB still not ready, sleeping"
sleep 1
done

node main.js
sleep 2

# initiate mongo replica set
for i in `seq 1 30`; do
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;

sleep 2

# try multiple times until replica set is ready
for i in `seq 1 30`; do
node main.js &&
s=$? && break || s=$?;
echo "Tried $i times. Waiting 5 secs...";
sleep 5;
done;
2 changes: 1 addition & 1 deletion .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rocketchat/base:12.14.0
FROM rocketchat/base:12.16.1

ADD . /app

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7

ENV RC_VERSION 3.0.12
ENV RC_VERSION 3.1.0

MAINTAINER buildmaster@rocket.chat

Expand Down
Loading

0 comments on commit dd9b1a1

Please sign in to comment.