Git Product home page Git Product logo

docker-goaccess-nginx's Introduction

Dockerized Goaccess + GeoIP + Nginx

Installation

  1. Create empty access.log file:

    $ mkdir -p log/nginx
    $ touch log/nginx/access.log
    
  2. Run docker-compose:

    $ docker-compose up -d
    
  3. Browse

    • your application on http://127.0.0.1:8080
    • goaccess on http://127.0.0.1:37890/goaccess

Optionally

  1. Edit access file for goaccess:

    $ vim config/nginx/access.conf
    
  2. Change GeoIP library to enterprise version in Dockerfile.

docker-goaccess-nginx's People

Contributors

icamys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-goaccess-nginx's Issues

Build fails, GeoLite2-City no longer available

Building the image fails. GeoLite2-City is no longer available via the path used...

Step 6/14 : RUN if [ ! -f $geolib_path/$geolib_filename ]; then       mkdir -p $geolib_path/ &&       wget -q -O - http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz |       tar         --strip-components=1         -C $geolib_path/         -xzvf - &&         mv $geolib_path/GeoLite2-City.mmdb $geolib_path/$geolib_filename;     fi
 ---> Running in 565aa1cdf7f8
wget: bad address 'geolite.maxmind.com'
tar: invalid magic
tar: short read

For the reasons of not having this data available, see: https://dev.maxmind.com/geoip/geoip2/geolite2/

In short:

Due to upcoming data privacy regulations, we are making significant changes to how you access free GeoLite2 databases starting December 30, 2019. Learn more on our blog.

Deploying to server

Hi there, Thanks for making this image, it helped alot
i testing it in local environment and it gives mealtime logs info
but when i deployed it on server ( testing mode, deploying on ip rather then domain )
it doesn't give me real time logs
also on local testing i could see a green icon in goaccess dashboard, while i cant see that in deployment
Please let me know if u have a solution for this ( ps i tried changing ip in goaccess.conf settings , but that didn't work )

Build issue: autoreconf, gettext-tools

Hi!

First of all thanks for creating this example setup!
I'm having an issue building it. It seems to fail at a different version of gettext.
The log is below... Any clue on how to avoid this?

Sending build context to Docker daemon  24.58kB
Step 1/14 : FROM alpine:edge
edge: Pulling from library/alpine
7692c7e2a2d0: Pull complete                                                                                             Digest: sha256:1d5bb486e4d475f3a0166f817612422d75aeafb9671d16d9c7201b8b8ab9a5b8
Status: Downloaded newer image for alpine:edge
 ---> 529f4bac5cdf
Step 2/14 : ARG build_deps="build-base ncurses-dev autoconf automake git gettext-dev"
 ---> Running in 3cb6c98190ea
Removing intermediate container 3cb6c98190ea
 ---> e3b95907f726
Step 3/14 : ARG runtime_deps="tini ncurses libintl gettext musl-utils libmaxminddb libmaxminddb-dev "
 ---> Running in 3b7719e22935
Removing intermediate container 3b7719e22935
 ---> 3ac02059de1f
Step 4/14 : ARG geolib_path="/usr/local/share/GeoIP"
 ---> Running in 9db99213668f
Removing intermediate container 9db99213668f
 ---> 5f48361b3691
Step 5/14 : ARG geolib_filename="GeoCity.dat"
 ---> Running in 6c6fd8557d7c
Removing intermediate container 6c6fd8557d7c
 ---> 0d8a79733514
Step 6/14 : RUN if [ ! -f $geolib_path/$geolib_filename ]; then       mkdir -p $geolib_path/ &&       wget -q -O - http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz |       tar         --strip-components=1         -C $geolib_path/         -xzvf - &&         mv $geolib_path/GeoLite2-City.mmdb $geolib_path/$geolib_filename;     fi
 ---> Running in 6cd62d2d5cde
GeoLite2-City_20190723/
GeoLite2-City_20190723/LICENSE.txt
GeoLite2-City_20190723/GeoLite2-City.mmdb
GeoLite2-City_20190723/COPYRIGHT.txt
GeoLite2-City_20190723/README.txt
Removing intermediate container 6cd62d2d5cde
 ---> b9650771c0d5
Step 7/14 : RUN apk update &&     apk add -u $runtime_deps $build_deps &&     git clone https://github.com/allinurl/goaccess /goaccess &&     cd /goaccess &&     autoreconf -fiv &&     ./configure --enable-utf8 --enable-geoip=mmdb &&     make &&     make install &&     apk del $build_deps &&     rm -rf /var/cache/apk/* /tmp/goaccess/* /goaccess
 ---> Running in 8bd66228cd24
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
v20190707-938-g14fcaeea68 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v20190707-938-g14fcaeea68 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
OK: 10655 distinct packages available
(1/53) Upgrading musl (1.1.22-r2 -> 1.1.23-r1)
(2/53) Upgrading busybox (1.30.1-r2 -> 1.31.0-r0)
Executing busybox-1.31.0-r0.post-upgrade
(3/53) Upgrading ssl_client (1.30.1-r2 -> 1.31.0-r0)
(4/53) Installing m4 (1.4.18-r1)
(5/53) Installing libbz2 (1.0.8-r0)
(6/53) Installing perl (5.28.2-r1)
(7/53) Installing autoconf (2.69-r2)
(8/53) Installing automake (1.16.1-r0)
(9/53) Installing binutils (2.32-r0)
(10/53) Installing libmagic (5.37-r0)
(11/53) Installing file (5.37-r0)
(12/53) Installing gmp (6.1.2-r1)
(13/53) Installing isl (0.18-r0)
(14/53) Installing libgomp (8.3.0-r0)
(15/53) Installing libatomic (8.3.0-r0)
(16/53) Installing libgcc (8.3.0-r0)
(17/53) Installing mpfr3 (3.1.5-r1)
(18/53) Installing mpc1 (1.1.0-r0)
(19/53) Installing libstdc++ (8.3.0-r0)
(20/53) Installing gcc (8.3.0-r0)
(21/53) Installing musl-dev (1.1.23-r1)
(22/53) Installing libc-dev (0.7.1-r0)
(23/53) Installing g++ (8.3.0-r0)
(24/53) Installing make (4.2.1-r2)
(25/53) Installing fortify-headers (1.1-r0)
(26/53) Installing build-base (0.5-r1)
(27/53) Installing libintl (0.20.1-r0)
(28/53) Installing ncurses-terminfo-base (6.1_p20190518-r0)
(29/53) Installing ncurses-terminfo (6.1_p20190518-r0)
(30/53) Installing ncurses-libs (6.1_p20190518-r0)
(31/53) Installing libunistring (0.9.10-r0)
(32/53) Installing gettext-libs (0.20.1-r0)
(33/53) Installing libxml2 (2.9.9-r2)
(34/53) Installing gettext (0.20.1-r0)
(35/53) Installing gettext-asprintf (0.20.1-r0)
(36/53) Installing gettext-dev (0.20.1-r0)
(37/53) Installing ca-certificates (20190108-r0)
(38/53) Installing nghttp2-libs (1.39.1-r0)
(39/53) Installing libcurl (7.65.3-r0)
(40/53) Installing expat (2.2.7-r0)
(41/53) Installing pcre2 (10.33-r0)
(42/53) Installing git (2.22.0-r2)
(43/53) Installing perl-error (0.17027-r0)
(44/53) Installing perl-git (2.22.0-r2)
(45/53) Installing git-perl (2.22.0-r2)
(46/53) Upgrading musl-utils (1.1.22-r2 -> 1.1.23-r1)
(47/53) Installing curl (7.65.3-r0)
(48/53) Installing libmaxminddb (1.3.2-r0)
(49/53) Installing pkgconf (1.6.1-r1)
(50/53) Installing libmaxminddb-dev (1.3.2-r0)
(51/53) Installing ncurses (6.1_p20190518-r0)
(52/53) Installing ncurses-dev (6.1_p20190518-r0)
(53/53) Installing tini (0.18.0-r0)
Executing busybox-1.31.0-r0.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 236 MiB in 63 packages
Cloning into '/goaccess'...
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
/usr/bin/autopoint: line 494: xz: not found
tar: short read
tar: gettext-0.18: not found in archive
autopoint: *** infrastructure files for version 0.18 not found; this is autopoint from GNU gettext-tools 0.20.1
autopoint: *** Stop.
autoreconf: autopoint failed with exit status: 1
The command '/bin/sh -c apk update &&     apk add -u $runtime_deps $build_deps &&     git clone https://github.com/allinurl/goaccess /goaccess &&     cd /goaccess &&     autoreconf -fiv &&     ./configure --enable-utf8 --enable-geoip=mmdb &&     make &&     make install &&     apk del $build_deps &&     rm -rf /var/cache/apk/* /tmp/goaccess/* /goaccess' returned a non-zero code: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.