File tree 6 files changed +61
-6
lines changed
6 files changed +61
-6
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,16 @@ RUN apt-get update && apt-get install -y sudo && \
37
37
mkdir /etc/service/nginx && \
38
38
mkdir /etc/service/countly-api && \
39
39
mkdir /etc/service/countly-dashboard && \
40
+ mkdir /etc/service/countly-ingestor && \
41
+ mkdir /etc/service/countly-aggregator && \
40
42
echo "" >> /etc/nginx/nginx.conf && \
41
43
echo "daemon off;" >> /etc/nginx/nginx.conf && \
42
44
\
43
45
cp /opt/countly/bin/commands/docker/mongodb.sh /etc/service/mongodb/run && \
44
46
cp /opt/countly/bin/commands/docker/nginx.sh /etc/service/nginx/run && \
45
47
cp /opt/countly/bin/commands/docker/countly-api.sh /etc/service/countly-api/run && \
48
+ cp /opt/countly/bin/commands/docker/countly-ingestor.sh /etc/service/countly-ingestor/run && \
49
+ cp /opt/countly/bin/commands/docker/countly-aggregator.sh /etc/service/countly-aggregator/run && \
46
50
cp /opt/countly/bin/commands/docker/countly-dashboard.sh /etc/service/countly-dashboard/run && \
47
51
\
48
52
chown mongodb /etc/service/mongodb/run && \
Original file line number Diff line number Diff line change @@ -67,11 +67,15 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
67
67
mkdir -p /etc/my_init.d && cp ./bin/docker/postinstall.sh /etc/my_init.d/ && \
68
68
mkdir /etc/service/nginx && \
69
69
mkdir /etc/service/countly-api && \
70
+ mkdir /etc/service/countly-ingestor && \
71
+ mkdir /etc/service/countly-aggregator && \
70
72
mkdir /etc/service/countly-dashboard && \
71
73
echo "" >> /etc/nginx/nginx.conf && \
72
74
echo "daemon off;" >> /etc/nginx/nginx.conf && \
73
75
cp ./bin/commands/docker/nginx.sh /etc/service/nginx/run && \
74
76
cp ./bin/commands/docker/countly-api.sh /etc/service/countly-api/run && \
77
+ cp ./bin/commands/docker/countly-ingestor.sh /etc/service/countly-ingestor/run && \
78
+ cp ./bin/commands/docker/countly-aggregator.sh /etc/service/countly-aggregator/run && \
75
79
cp ./bin/commands/docker/countly-dashboard.sh /etc/service/countly-dashboard/run && \
76
80
chown -R countly:countly /opt/countly && \
77
81
# cleanup
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ " $COUNTLY_MONGO_INSIDE " == " 1" ]
4
+ then
5
+ until mongo localhost --eval " db.stats()" | grep " collections"
6
+ do
7
+ echo
8
+ echo " [api] waiting for MongoDB to allocate files ..."
9
+ sleep 1
10
+ done
11
+ sleep 3
12
+ echo " [api] MongoDB started"
13
+ fi
14
+
15
+ exec /sbin/setuser countly /usr/bin/nodejs /opt/countly/api/aggregator.js
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ if [ " $COUNTLY_MONGO_INSIDE " == " 1" ]
4
+ then
5
+ until mongo localhost --eval " db.stats()" | grep " collections"
6
+ do
7
+ echo
8
+ echo " [api] waiting for MongoDB to allocate files ..."
9
+ sleep 1
10
+ done
11
+ sleep 3
12
+ echo " [api] MongoDB started"
13
+ fi
14
+
15
+ exec /sbin/setuser countly /usr/bin/nodejs /opt/countly/api/ingestor.js
Original file line number Diff line number Diff line change @@ -12,11 +12,19 @@ server {
12
12
if ($http_content_type = "text/ping") {
13
13
return 404;
14
14
}
15
+ proxy_pass http://localhost:3010;
16
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17
+ proxy_set_header X-Real-IP $remote_addr;
18
+ }
15
19
16
- proxy_pass http://localhost:3001;
17
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
18
- proxy_set_header X-Real-IP $remote_addr;
19
- }
20
+ location = /i/bulk {
21
+ if ($http_content_type = "text/ping") {
22
+ return 404;
23
+ }
24
+ proxy_pass http://localhost:3010;
25
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26
+ proxy_set_header X-Real-IP $remote_addr;
27
+ }
20
28
21
29
# Unblocked paths on API service
22
30
#
@@ -30,7 +38,7 @@ server {
30
38
# /o/surveys/nps/widget
31
39
# /i/campaign/click/*
32
40
33
- location ~ (/i/bulk|/ o/sdk|/o/actions|/o/feedback/multiple-widgets-by-id|/o/feedback/widget|/o/surveys/survey/widget|/o/surveys/nps/widget|/i/campaign/click/*) {
41
+ location ~ (/o/sdk|/o/actions|/o/feedback/multiple-widgets-by-id|/o/feedback/widget|/o/surveys/survey/widget|/o/surveys/nps/widget|/i/campaign/click/*) {
34
42
if ($http_content_type = "text/ping") {
35
43
return 404;
36
44
}
Original file line number Diff line number Diff line change @@ -64,7 +64,16 @@ server {
64
64
if ($http_content_type = "text/ping") {
65
65
return 404;
66
66
}
67
- proxy_pass http://localhost:3001;
67
+ proxy_pass http://localhost:3010;
68
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69
+ proxy_set_header X-Real-IP $remote_addr;
70
+ }
71
+
72
+ location = /i/bulk {
73
+ if ($http_content_type = "text/ping") {
74
+ return 404;
75
+ }
76
+ proxy_pass http://localhost:3010;
68
77
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69
78
proxy_set_header X-Real-IP $remote_addr;
70
79
}
You can’t perform that action at this time.
0 commit comments