Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok authored Mar 21, 2020
2 parents 93fd309 + ed091d3 commit a467ecd
Show file tree
Hide file tree
Showing 908 changed files with 36,769 additions and 24,638 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env"
]
}
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:8
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:8.17.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 2.5.0-develop
ENV RC_VERSION 3.1.0-develop

MAINTAINER buildmaster@rocket.chat

Expand Down
23 changes: 18 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@
"react/jsx-fragments": [
"error",
"syntax"
],
]
},
"settings": {
"react": {
"version": "detect",
"import/resolver": {
"node": {
"extensions": [
".js",
".ts",
".tsx"
]
}
},
"react": {
"version": "detect"
}
},
"overrides": [
{
Expand All @@ -38,9 +47,9 @@
"**/*.tsx"
],
"extends": [
"@rocket.chat/eslint-config",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended"
"plugin:@typescript-eslint/eslint-recommended",
"@rocket.chat/eslint-config"
],
"globals": {
"Atomics": "readonly",
Expand Down Expand Up @@ -73,6 +82,10 @@
"syntax"
],
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/indent": [
"error",
"tab"
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": [
"error",
Expand Down
5 changes: 5 additions & 0 deletions .github/history-manual.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
"title": "[BREAK] Support for Cordova (Rocket.Chat Legacy app) has reached End-of-life, support has been discontinued",
"userLogin": "sampaiodiego",
"contributors": []
}],
"3.0.0-rc.9": [{
"title": "[BREAK] TLS v1.0 and TLS v1.1 were disabled by due to NodeJS update to v12. You can still enable them by using flags like `--tls-min-v1.0` and `--tls-min-v1.1`",
"userLogin": "sampaiodiego",
"contributors": []
}]
}
Loading

0 comments on commit a467ecd

Please sign in to comment.