File tree Expand file tree Collapse file tree 7 files changed +49
-26
lines changed
Expand file tree Collapse file tree 7 files changed +49
-26
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,22 @@ RUN apk add --no-cache \
66 ncurses-dev \
77 musl-libintl
88
9+ # download goaccess
10+ WORKDIR /goaccess-temp
11+ RUN wget https://tar.goaccess.io/goaccess-1.6.2.tar.gz
12+
13+ # set up goacess-debug
14+ WORKDIR /goaccess-debug
15+ RUN cp /goaccess-temp/goaccess-1.6.2.tar.gz .
16+ RUN tar --strip-components=1 -xzvf goaccess-1.6.2.tar.gz
17+ RUN ./configure --enable-utf8 --enable-geoip=mmdb --with-getline --enable-debug
18+ RUN make
19+ RUN make install
20+
921# set up goacess
1022WORKDIR /goaccess
11- RUN wget https://tar. goaccess.io /goaccess-1.6.tar.gz
12- RUN tar --strip-components=1 -xzvf goaccess-1.6.tar.gz
23+ RUN cp / goaccess-temp /goaccess-1.6.2. tar.gz .
24+ RUN tar --strip-components=1 -xzvf goaccess-1.6.2. tar.gz
1325RUN ./configure --enable-utf8 --enable-geoip=mmdb --with-getline
1426RUN make
1527RUN make install
@@ -28,14 +40,19 @@ RUN apk add --no-cache \
2840 rm -rf /var/lib/apt/lists/* && \
2941 rm /etc/nginx/nginx.conf
3042
43+ COPY --from=builder /goaccess-debug /goaccess-debug
3144COPY --from=builder /goaccess /goaccess
45+
3246COPY /resources/goaccess/goaccess.conf /goaccess-config/goaccess.conf.bak
3347COPY /resources/goaccess/GeoLite2-City.mmdb /goaccess-config/GeoLite2-City.mmdb
3448
3549# set up nginx
3650COPY /resources/nginx/nginx.conf /etc/nginx/nginx.conf
3751ADD /resources/nginx/.htpasswd /opt/auth/.htpasswd
3852
53+ # goaccess logs
54+ WORKDIR /goaccess-logs
55+
3956WORKDIR /goan
4057ADD /resources/scripts/funcs funcs
4158ADD /resources/scripts/logs logs
Original file line number Diff line number Diff line change @@ -39,11 +39,6 @@ function custom_init(){
3939 fi
4040}
4141
42- function custom_instance(){
43- echo -e " \nRUN CUSTOM GOACCESS"
44- /goaccess/goaccess --no-global-config --config-file=${goan_config} &
45- }
46-
4742function custom(){
4843 custom_init
4944
@@ -59,5 +54,11 @@ function custom(){
5954 echo " Custom instance processing: (might take some time depending on the number of files to parse)" >> ${nginx_html}
6055 echo " <br/></p></body></html>" >> ${nginx_html}
6156
62- custom_instance
57+ echo -e " \nRUN CUSTOM GOACCESS"
58+ if [[ " ${DEBUG} " == " True" ]]; then
59+ /goaccess-debug/goaccess --debug-file=${goaccess_debug_file} --invalid-requests=${goaccess_invalid_file} --no-global-config --config-file=${goan_config} &
60+ else
61+ /goaccess/goaccess --no-global-config --config-file=${goan_config} &
62+ fi
63+
6364}
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ function npm_init(){
3333 fi
3434}
3535
36- function npm_instance(){
37- echo -e " \nRUN NPM GOACCESS"
38- /goaccess/goaccess --no-global-config --config-file=${goan_config} &
39- }
40-
4136function npm_goaccess_config(){
4237 echo -e " \n\n\n" >> ${goan_config}
4338 echo " ######################################" >> ${goan_config}
@@ -153,5 +148,10 @@ function npm(){
153148 echo " Logs processing: $(( $goan_log_count + $goan_archive_log_count )) (might take some time depending on the number of files to parse)" >> ${nginx_html}
154149 echo " <br/></p></body></html>" >> ${nginx_html}
155150
156- npm_instance
151+ echo -e " \nRUN NPM GOACCESS"
152+ if [[ " ${DEBUG} " == " True" ]]; then
153+ /goaccess-debug/goaccess --debug-file=${goaccess_debug_file} --invalid-requests=${goaccess_invalid_file} --no-global-config --config-file=${goan_config} &
154+ else
155+ /goaccess/goaccess --no-global-config --config-file=${goan_config} &
156+ fi
157157}
Original file line number Diff line number Diff line change @@ -33,10 +33,6 @@ function npm_redirect_init(){
3333 fi
3434}
3535
36- function npm_redirect_instance(){
37- echo -e " \nRUN NPM REDIRECT GOACCESS"
38- /goaccess/goaccess --no-global-config --config-file=${goan_config} &
39- }
4036
4137function npm_redirect_goaccess_config(){
4238 echo -e " \n\n\n" >> ${goan_config}
@@ -153,5 +149,10 @@ function npm_redirect(){
153149 echo " Logs processing: $(( $goan_log_count + $goan_archive_log_count )) (might take some time depending on the number of files to parse)" >> ${nginx_html}
154150 echo " <br/></p></body></html>" >> ${nginx_html}
155151
156- npm_redirect_instance
152+ echo -e " \nRUN NPM REDIRECT GOACCESS"
153+ if [[ " ${DEBUG} " == " True" ]]; then
154+ /goaccess-debug/goaccess --debug-file=${goaccess_debug_file} --invalid-requests=${goaccess_invalid_file} --no-global-config --config-file=${goan_config} &
155+ else
156+ /goaccess/goaccess --no-global-config --config-file=${goan_config} &
157+ fi
157158}
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ function traefik_init(){
3333 fi
3434}
3535
36- function traefik_instance(){
37- echo -e " \nRUN TRAEFIK GOACCESS"
38- /goaccess/goaccess --no-global-config --config-file=${goan_config} &
39- }
40-
4136function traefik_goaccess_config(){
4237 echo -e " \n\n\n" >> ${goan_config}
4338 echo " ######################################" >> ${goan_config}
@@ -122,5 +117,10 @@ function traefik(){
122117 echo " Logs processing: $(( $goan_log_count )) (might take some time depending on the number of files to parse)" >> ${nginx_html}
123118 echo " <br/></p></body></html>" >> ${nginx_html}
124119
125- traefik_instance
120+ echo -e " \nRUN TRAEFIK GOACCESS"
121+ if [[ " ${DEBUG} " == " True" ]]; then
122+ /goaccess-debug/goaccess --debug-file=${goaccess_debug_file} --invalid-requests=${goaccess_invalid_file} --no-global-config --config-file=${goan_config} &
123+ else
124+ /goaccess/goaccess --no-global-config --config-file=${goan_config} &
125+ fi
126126}
Original file line number Diff line number Diff line change @@ -6,9 +6,13 @@ source $(dirname "$0")/logs/npm_redirection.sh
66source $( dirname " $0 " ) /logs/traefik.sh
77source $( dirname " $0 " ) /logs/custom.sh
88
9- goan_version=" GOAN v1.1.3 "
9+ goan_version=" GOAN v1.1.4 "
1010goan_log_path=" /opt/log"
1111
12+ goaccess_ping_interval=15
13+ goaccess_debug_file=/goaccess-logs/goaccess.debug
14+ goaccess_invalid_file=/goaccess-logs/goaccess.invalid
15+
1216echo -e " \n${goan_version} \n"
1317
1418# ## NGINX
You can’t perform that action at this time.
0 commit comments