Skip to content

Commit f51c51c

Browse files
authored
Merge pull request #19 from Countly/master
sync
2 parents 85ebe66 + aee3959 commit f51c51c

File tree

105 files changed

+2892
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2892
-1024
lines changed

.eslintignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ frontend/express/public/javascripts/min/**
55
frontend/express/public/javascripts/utils/**
66
frontend/express/public/javascripts/visualization/**
77
frontend/express/public/themes/**
8+
frontend/express/public/sdk/**
89
plugins/*/frontend/public/*
910
plugins/*/frontend/public/javascripts/*
1011
bin/scripts/nghttp2/*
1112
plugins/push/api/parts/apn/*
1213

1314
!plugins/*/frontend/public/javascripts
14-
!plugins/*/frontend/public/javascripts/countly.models.js
15-
!plugins/*/frontend/public/javascripts/countly.views.js
15+
!plugins/*/frontend/public/javascripts/countly.*.js

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@
194194
"frontend/express/libs/*.js",
195195
"plugins/pluginManager.js",
196196
"plugins/*/api/**/*.js",
197-
"plugins/*/frontend/*.js"
197+
"plugins/*/frontend/*.js",
198+
"plugins/*/extend/*.js"
198199
],
199200
"env": {
200201
"es6": true,

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: nodejs
22
dist: trusty
3-
node_js: "8"
3+
node_js: "12"
44
env:
55
global:
6-
- MONGODB=3.6.6
6+
- MONGODB=4.0.12
77
- secure: ZXdUMP+8Nk9Kd5nX31D/DIB1t2xlJd+T4W7umWjwpy+KPA9d1W1OhUG6V2Gpv3PsJf+UtMosgZsywcLFVG4l/WcjAhs3c9pegW5ZRYAEfVjkk7aHhWQGvj5DID8iAAxs91Mm8LwJ43o68x+XN6746zArPqcVzQltDunJ0G3gfh8=
88
branches:
99
except:

Dockerfile-centos-api

+40-38
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
11
FROM centos/nodejs-8-centos7
22

3-
ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,enterpriseinfo,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,assistant,times-of-day,compliance-hub,video-intelligence-monetization,alerts,onboarding
3+
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,enterpriseinfo,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,assistant,times-of-day,compliance-hub,video-intelligence-monetization,alerts,onboarding
44
# Enterprise Edition:
5-
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,drill,funnels,concurrent_users,retention_segments,revenue,logger,systemlogs,populator,reports,crashes,push,block,restrict,users,geo,star-rating,slipping-away-users,compare,server-stats,dashboards,assistant,flows,dbviewer,cohorts,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,remote-config,formulas,ab-testing
5+
ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,drill,funnels,concurrent_users,retention_segments,revenue,logger,systemlogs,populator,reports,crashes,push,block,restrict,users,geo,star-rating,slipping-away-users,compare,server-stats,dashboards,assistant,flows,dbviewer,cohorts,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,remote-config,formulas,ab-testing
6+
7+
HEALTHCHECK --start-period=60s CMD curl --fail http://localhost:3001/o/ping || exit 1
68

79
USER root
810

911
# Core dependencies
1012
## Tini
11-
ENV TINI_VERSION 0.18.0
12-
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm /tmp/tini.rpm
13-
RUN rpm -i /tmp/tini.rpm
14-
15-
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
16-
17-
RUN yum -y install sendmail openssl-devel gcc-c++-4.8.5 make git make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools
13+
ENV COUNTLY_CONTAINER="api" \
14+
COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \
15+
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
16+
TINI_VERSION="0.18.0" \
17+
PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
1818

19-
# Required by push plugin
20-
RUN git clone https://github.com/nghttp2/nghttp2.git /tmp/nghttp2 && \
21-
cd /tmp/nghttp2 && \
22-
git checkout tags/v1.30.0 && \
23-
export CFLAGS="-g -O2 -fPIC" && export CPPFLAGS="-fPIC" && autoreconf -i && automake && autoconf && ./configure --disable-examples --disable-app && make && make install
24-
25-
# Setup Countly
26-
ENV COUNTLY_CONTAINER="api"
27-
ENV COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}"
28-
ENV COUNTLY_CONFIG_API_API_HOST="0.0.0.0"
29-
30-
## The files
31-
RUN mkdir /opt/countly && chown 1001:0 /opt/countly
32-
USER 1001:0
33-
ENV PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
3419
WORKDIR /opt/countly
35-
COPY --chown=1001:0 . .
36-
HEALTHCHECK --start-period=60s CMD curl --fail http://localhost:3001/o/ping || exit 1
37-
38-
## API runtime dependencies
39-
RUN cp -n api/config.sample.js api/config.js && \
40-
cp -n frontend/express/config.sample.js frontend/express/config.js && \
20+
COPY . .
21+
22+
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
23+
rpm -i /tmp/tini.rpm && \
24+
yum -y install openssl-devel gcc-c++-4.8.5 make git make binutils autoconf automake makedepend libtool pkgconfig zlib-devel libxml2-devel python-setuptools && \
25+
git clone https://github.com/nghttp2/nghttp2.git /tmp/nghttp2 --single-branch --branch=v1.30.0 --depth=1 && \
26+
(cd /tmp/nghttp2; \
27+
export CFLAGS="-g -O2 -fPIC" && export CPPFLAGS="-fPIC" && autoreconf -i && automake && autoconf && ./configure --disable-examples --disable-app && make && make install) && \
28+
\
29+
# modify standard distribution
30+
./bin/docker/modify.sh && \
31+
\
32+
# preinstall
33+
cp -n ./api/config.sample.js ./api/config.js && \
34+
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
4135
HOME=/tmp npm install && \
42-
./bin/docker/preinstall.sh
43-
44-
USER root
45-
46-
RUN ./bin/docker/modify.sh && \
47-
chown -R 1001:0 /opt/countly && \
36+
./bin/docker/preinstall.sh && \
37+
\
38+
# cleanup & chown
39+
npm remove -y mocha nyc should supertest && \
40+
rm -rf /opt/app-root/src/.npm && \
4841
yum remove -y git gcc make automake autoconf makedepend zlib-devel libxml2-devel python-setuptools openssl-devel && \
42+
# yum -y autoremove && \
43+
yum -y install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc && \
4944
yum clean all && \
50-
rm -rf /tmp/* /var/tmp/*
45+
rm -rf /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* && \
46+
chown -R 1001:0 /opt/countly && \
47+
chmod -R g=u /opt/countly
48+
5149

5250
USER 1001:0
53-
ENV PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
51+
52+
#ENV PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
53+
54+
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
55+
5456
CMD ["/opt/countly/bin/docker/cmd.sh"]

Dockerfile-centos-frontend

+39-34
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
11
FROM centos/nodejs-8-centos7
22

3-
ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,enterpriseinfo,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,assistant,times-of-day,compliance-hub,video-intelligence-monetization,alerts,onboarding
3+
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,enterpriseinfo,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,assistant,times-of-day,compliance-hub,video-intelligence-monetization,alerts,onboarding
44
# Enterprise Edition:
5-
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,drill,funnels,concurrent_users,retention_segments,revenue,logger,systemlogs,populator,reports,crashes,push,block,restrict,users,geo,star-rating,slipping-away-users,compare,server-stats,dashboards,assistant,flows,dbviewer,cohorts,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,remote-config,formulas,ab-testing
5+
ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,drill,funnels,concurrent_users,retention_segments,revenue,logger,systemlogs,populator,reports,crashes,push,block,restrict,users,geo,star-rating,slipping-away-users,compare,server-stats,dashboards,assistant,flows,dbviewer,cohorts,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,remote-config,formulas,ab-testing
6+
7+
HEALTHCHECK --start-period=120s CMD curl --fail http://localhost:6001/ping || exit 1
68

79
USER root
810

911
# Core dependencies
1012
## Tini
11-
ENV TINI_VERSION 0.18.0
12-
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm /tmp/tini.rpm
13-
RUN rpm -i /tmp/tini.rpm
13+
ENV COUNTLY_CONTAINER="frontend" \
14+
COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \
15+
COUNTLY_CONFIG_FRONTEND_WEB_HOST="0.0.0.0" \
16+
TINI_VERSION="0.18.0" \
17+
PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
1418

15-
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
16-
17-
RUN yum -y install sendmail
19+
WORKDIR /opt/countly
20+
COPY . .
21+
22+
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
23+
rpm -i /tmp/tini.rpm && \
24+
# modify standard distribution
25+
./bin/docker/modify.sh && \
26+
\
27+
# preinstall
28+
cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
29+
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
30+
cp -n ./api/config.sample.js ./api/config.js && \
31+
HOME=/tmp npm install && \
32+
./bin/docker/preinstall.sh && \
33+
\
34+
# cleanup & chown
35+
npm remove -y mocha nyc should supertest && \
36+
rm -rf /opt/app-root/src/.npm && \
37+
yum remove -y git gcc make automake autoconf makedepend zlib-devel libxml2-devel python-setuptools openssl-devel && \
38+
yum -y autoremove && \
39+
yum clean all && \
40+
rm -rf /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* && \
41+
chown -R 1001:0 /opt/countly && \
42+
chmod -R g=u /opt/countly && \
43+
\
44+
bash ./bin/scripts/detect.init.sh && \
45+
./bin/commands/countly.sh update sdk-web
1846

19-
# Setup Countly
20-
ENV COUNTLY_CONTAINER="frontend"
21-
ENV COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}"
22-
ENV COUNTLY_CONFIG_FRONTEND_WEB_HOST="0.0.0.0"
2347

24-
## The files
25-
RUN mkdir /opt/countly && chown 1001:0 /opt/countly
2648
USER 1001:0
27-
ENV PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
28-
WORKDIR /opt/countly
29-
COPY --chown=1001:0 . .
30-
HEALTHCHECK --start-period=120s CMD curl --fail http://localhost:6001/ping || exit 1
31-
32-
RUN cp -n frontend/express/public/javascripts/countly/countly.config.sample.js frontend/express/public/javascripts/countly/countly.config.js && \
33-
cp -n frontend/express/config.sample.js frontend/express/config.js && \
34-
cp -n api/config.sample.js api/config.js && \
35-
HOME=/tmp npm install && \
36-
./bin/docker/preinstall.sh
3749

38-
USER root
50+
#ENV PATH="/opt/rh/rh-nodejs8/root/usr/bin:${PATH}"
3951

40-
RUN ./bin/docker/modify.sh && \
41-
chown -R 1001:0 /opt/countly && \
42-
bash /opt/countly/bin/scripts/detect.init.sh && \
43-
yum remove -y git gcc make automake autoconf makedepend zlib-devel libxml2-devel openssl-devel && \
44-
yum clean all && \
45-
rm -rf /tmp/* /var/tmp/*
52+
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
4653

47-
USER 1001:0
48-
RUN countly update sdk-web
49-
CMD ["/opt/countly/bin/docker/cmd.sh"]
54+
CMD ["/opt/countly/bin/docker/cmd.sh"]

Dockerfile-core

+73-22
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,86 @@
1-
FROM phusion/baseimage:0.9.16
1+
FROM phusion/baseimage:0.10.2
2+
3+
ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,enterpriseinfo,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,assistant,times-of-day,compliance-hub,video-intelligence-monetization,alerts,onboarding
4+
# Enterprise Edition:
5+
#ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,drill,funnels,concurrent_users,retention_segments,revenue,logger,systemlogs,populator,reports,crashes,push,block,restrict,users,geo,star-rating,slipping-away-users,compare,server-stats,dashboards,assistant,flows,dbviewer,cohorts,crash_symbolication,crashes-jira,groups,white-labeling,alerts,times-of-day,compliance-hub,onboarding,remote-config,formulas,ab-testing
26

37
ARG COUNTLY_CONFIG_API_MONGODB_HOST=localhost
48
ARG COUNTLY_CONFIG_FRONTEND_MONGODB_HOST=localhost
59

610
CMD ["/sbin/my_init"]
711

812
## Setup Countly
9-
ENV INSIDE_DOCKER 1
10-
ENV INSIDE_DOCKER_NOMONGO 1
13+
ENV COUNTLY_CONTAINER="both" \
14+
COUNTLY_DEFAULT_PLUGINS="${COUNTLY_PLUGINS}" \
15+
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
16+
COUNTLY_CONFIG_FRONTEND_WEB_HOST="0.0.0.0"
17+
18+
EXPOSE 80
19+
USER root
1120

12-
COPY / /opt/countly
13-
RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
14-
echo "countly ALL=(ALL) NOPASSWD: /usr/bin/sv restart countly-api countly-dashboard" >> /etc/sudoers.d/countly && \
15-
/opt/countly/bin/countly.install.sh
21+
WORKDIR /opt/countly
22+
COPY . .
1623

17-
# Change MongoDB folder permissions and add services folders
18-
RUN mkdir /etc/service/nginx && \
24+
RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
25+
apt-get update && \
26+
apt-get -y install \
27+
# standard
28+
build-essential libkrb5-dev git sqlite3 wget sudo \
29+
# nginx
30+
nginx \
31+
# puppeteer
32+
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 \
33+
libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 \
34+
libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils \
35+
# push / nghttp2
36+
gcc-4.8 g++-4.8 make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev \
37+
libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \
38+
# node
39+
wget -qO- https://deb.nodesource.com/setup_8.x | bash - && \
40+
# data_migration (mongo clients)
41+
wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | apt-key add - && \
42+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list && \
43+
apt-get update && \
44+
apt-get -y install nodejs mongodb-org-shell mongodb-org-tools && \
45+
\
46+
# nghttp2
47+
(export CXX="g++-4.8" && export CC="gcc-4.8" && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 && \
48+
git clone https://github.com/nghttp2/nghttp2.git /tmp/nghttp2 --single-branch --branch=v1.30.0 --depth=1 && \
49+
cd /tmp/nghttp2 && \
50+
export CFLAGS="-g -O2 -fPIC" && export CPPFLAGS="-fPIC" && autoreconf -i && automake && autoconf && \
51+
./configure --disable-examples --disable-app && make && make install && export CC="" && export CXX="") && \
52+
\
53+
# configs
54+
cp ./bin/config/nginx.server.conf /etc/nginx/sites-enabled/default && \
55+
cp ./bin/config/nginx.conf /etc/nginx/nginx.conf && \
56+
cp ./api/config.sample.js ./api/config.js && \
57+
cp ./frontend/express/config.sample.js ./frontend/express/config.js && \
58+
cp ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
59+
\
60+
# npm dependencies
61+
./bin/docker/modify.sh && \
62+
HOME=/tmp npm install --unsafe-perm && \
63+
./bin/docker/preinstall.sh && \
64+
\
65+
# web sdk
66+
bash ./bin/scripts/detect.init.sh && \
67+
countly update sdk-web && \
68+
\
69+
# services and such
70+
mkdir -p /etc/my_init.d && cp ./bin/docker/postinstall.sh /etc/my_init.d/ && \
71+
mkdir /etc/service/nginx && \
1972
mkdir /etc/service/countly-api && \
2073
mkdir /etc/service/countly-dashboard && \
2174
echo "" >> /etc/nginx/nginx.conf && \
22-
echo "daemon off;" >> /etc/nginx/nginx.conf
23-
24-
# Add services' run scripts
25-
ADD ./bin/commands/docker/nginx.sh /etc/service/nginx/run
26-
ADD ./bin/commands/docker/countly-api.sh /etc/service/countly-api/run
27-
ADD ./bin/commands/docker/countly-dashboard.sh /etc/service/countly-dashboard/run
28-
29-
# Only root can change run scripts
30-
RUN chown root /etc/service/nginx/run && \
31-
chown -R countly:countly /opt/countly
32-
33-
EXPOSE 80
75+
echo "daemon off;" >> /etc/nginx/nginx.conf && \
76+
cp ./bin/commands/docker/nginx.sh /etc/service/nginx/run && \
77+
cp ./bin/commands/docker/countly-api.sh /etc/service/countly-api/run && \
78+
cp ./bin/commands/docker/countly-dashboard.sh /etc/service/countly-dashboard/run && \
79+
chown -R countly:countly /opt/countly && \
80+
# cleanup
81+
apt-get -y remove build-essential libkrb5-dev git sqlite3 wget \
82+
gcc-4.8 g++-4.8 gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \
83+
apt-get clean && \
84+
rm -rf /var/lib/apt/lists/* /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* ~/.npm
3485

35-
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
86+
# USER 1001:0

Gruntfile.js

+5
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module.exports = function(grunt) {
8080
'frontend/express/public/javascripts/visualization/flot/jquery.flot.spline.js',
8181
'frontend/express/public/javascripts/visualization/flot/jquery.flot.crosshair.js',
8282
'frontend/express/public/javascripts/visualization/flot/jquery.flot.orderBars.js',
83+
'frontend/express/public/javascripts/visualization/flot/jquery.flot.navigate.js',
8384
'frontend/express/public/javascripts/visualization/gauge.min.js',
8485
'frontend/express/public/javascripts/visualization/d3/d3.min.js',
8586
'frontend/express/public/javascripts/visualization/rickshaw/rickshaw.min.js'
@@ -225,6 +226,10 @@ module.exports = function(grunt) {
225226
plugins.splice(plugins.indexOf('funnels'), 1);
226227
plugins.push('funnels');
227228
}
229+
if (plugins.indexOf('formulas') !== -1) {
230+
plugins.splice(plugins.indexOf('formulas'), 1);
231+
plugins.push('formulas');
232+
}
228233
}
229234

230235
plugins.forEach(function(plugin) {

Vagrantfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Vagrant.configure("2") do |config|
1313

1414
# Every Vagrant development environment requires a box. You can search for
1515
# boxes at https://vagrantcloud.com/search.
16-
config.vm.box = "bento/ubuntu-16.04"
16+
config.vm.box = "ubuntu/xenial64"
1717

1818
# Disable automatic box update checking. If you disable this, then
1919
# boxes will only be checked for updates when the user runs

api/api.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ plugins.setConfigs("api", {
9898
total_users: true,
9999
export_limit: 10000,
100100
prevent_duplicate_requests: true,
101-
metric_changes: true
101+
metric_changes: true,
102+
reports_regenerate_interval: 3600
102103
});
103104

104105
/**
@@ -242,7 +243,7 @@ if (cluster.isMaster) {
242243
jobs.job('api:ping').replace().schedule('every 1 day');
243244
jobs.job('api:clear').replace().schedule('every 1 day');
244245
jobs.job('api:clearTokens').replace().schedule('every 1 day');
245-
jobs.job('api:task').replace().schedule('every 1 hour on the first min');
246+
jobs.job('api:task').replace().schedule('every 5 minutes');
246247
jobs.job('api:userMerge').replace().schedule('every 1 hour on the 10th min');
247248
}, 10000);
248249
}

0 commit comments

Comments
 (0)