Skip to content

Commit 0c85eef

Browse files
Stable version (#16)
Initial Commit * updated readme with docker instructions * added github repo url * added screenshot and more information * additional check of access files * checking to make sure the filenames collected are files and permission listing * changed the shell to bash * added loading index page / allows you to know the container is up but still parsing * added permission sample * added MaxMind database for GeoIP support * correction if no proxy logs exist * added port number in PUID & GUID compose * updated readme, added arm version link Co-authored-by: JustSKY <[email protected]>
1 parent 67ce45e commit 0c85eef

File tree

7 files changed

+926
-0
lines changed

7 files changed

+926
-0
lines changed

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM ubuntu:20.04
2+
3+
RUN export DEBIAN_FRONTEND=noninteractive
4+
RUN apt-get update -y
5+
6+
# install nginx
7+
RUN apt-get install -y nginx
8+
9+
# install deps
10+
RUN apt-get install -y build-essential libmaxminddb-dev libncurses-dev
11+
RUN apt-get install -y tini ca-certificates wget curl
12+
13+
# clean up
14+
RUN apt-get autoremove -qy
15+
16+
# set up goacess
17+
WORKDIR /goaccess
18+
RUN wget https://tar.goaccess.io/goaccess-1.5.5.tar.gz
19+
RUN tar --strip-components=1 -xzvf goaccess-1.5.5.tar.gz
20+
RUN ./configure --enable-utf8 --enable-geoip=mmdb --with-getline
21+
RUN make
22+
RUN make install
23+
COPY /resources/goaccess/goaccess.conf /goaccess-config/goaccess.conf
24+
COPY /resources/goaccess/GeoLite2-City.mmdb /goaccess-config/GeoLite2-City.mmdb
25+
26+
# set up nginx
27+
RUN rm /etc/nginx/sites-enabled/default
28+
COPY /resources/nginx/index.html /var/www/html/index.html
29+
COPY /resources/nginx/nginx.conf /etc/nginx/nginx.conf
30+
31+
VOLUME ["/opt/log"]
32+
EXPOSE 7880
33+
34+
COPY /resources/scripts/start.sh /start.sh
35+
RUN ["chmod", "+x", "/start.sh"]
36+
CMD ["bash", "/start.sh"]

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
# GoAccess for Nginx Proxy Manager Logs
2+
3+
Still in development... You might need to wait a bit if you have a large amount of logs for it to parse.
4+
5+
Docker image: https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager
6+
7+
Github Repo: https://github.com/xavier-hernandez/goaccess-for-nginxproxymanager
8+
9+
![Alt text](https://i.ibb.co/fNj9Dcy/goaccess1.jpg "GoAccess Dashboard")
10+
11+
New to creating docker images so bear with me. I did this more for me then for public consumption but it appears to work so maybe someone might find it useful.
12+
13+
This docker container should work out of the box with Nginx Proxy Manager to parse proxy logs. The goaccess.conf has been configured to only access proxy logs and archived proxy logs.
14+
15+
The docker image scans and includes files matching the following criteria: proxy-host-*_access.log.gz proxy-host-*_access.log
16+
17+
Currently using GoAccess version: 1.5.5
18+
19+
Thanks to Just5KY you can find the arm version here: [justsky/goaccess-for-nginxproxymanager](https://hub.docker.com/r/justsky/goaccess-for-nginxproxymanager)
20+
21+
22+
```yml
23+
goaccess:
24+
image: xavierh/goaccess-for-nginxproxymanager:develop
25+
container_name: goaccess
26+
restart: always
27+
environment:
28+
- TZ=America/New_York
29+
ports:
30+
- '7880:7880'
31+
volumes:
32+
- /path/to/host/nginx/logs:/opt/log
33+
```
34+
If you have permission issues, you can add PUID and PGID with the correct user id that has read access to the log files.
35+
```yml
36+
goaccess:
37+
image: xavierh/goaccess-for-nginxproxymanager:develop
38+
container_name: goaccess
39+
restart: always
40+
volumes:
41+
- /path/to/host/nginx/logs:/opt/log
42+
ports:
43+
- '7880:7880'
44+
environment:
45+
- PUID=0
46+
- PGID=0
47+
- TZ=America/New_York
48+
```
49+
50+
Thanks to https://github.com/GregYankovoy for the inspiration, and for their nginx.conf :)
51+
52+
This product includes GeoLite2 data created by MaxMind, available from
53+
<a href="https://www.maxmind.com">https://www.maxmind.com</a>.
54+
=======
155
# GoAccess Docker Image for Nginx Proxy Manager
256
357
For development information
67.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)