This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Nikolaos Karaolidis ba39f14d4f Update repo path
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2023-06-20 16:01:47 +03:00
2022-09-02 09:37:11 +00:00
2022-05-17 16:11:43 +01:00
2023-06-20 16:01:47 +03:00

goaccess-docker

GoAccess Alpine docker image using Nginx for easy proxying.

Usage

Docker

docker run --name goaccess -p 7889:7889 -v /path/to/host/nginx/logs:/opt/log:ro -v /path/to/GeoLite2-City.mmdb:/GeoLite2-City.mmdb -v /path/to/goaccess/storage:/config -d registry.karaolidis.com/karaolidis/goaccess-docker

Docker Compose

version: '3'
services:
  goaccess:
    image: registry.karaolidis.com/karaolidis/goaccess-docker
    container_name: goaccess
    restart: unless-stopped
    ports:
      - "7889:7889"
    volumes:
      - "/path/to/host/nginx/logs:/opt/log:ro"
      - "/path/to/GeoLite2-City.mmdb:/GeoLite2-City.mmdb"
      - "/path/to/goaccess/storage:/config"

Volume Mounts

  • /opt/log - Nginx logs
  • /GeoLite2-City.mmdb - GeoLite2 City database (get it from here)
  • /config - GoAccess configuration and static files

Environment Variables

  • PUID - User ID to run GoAccess and Nginx as
  • PGID - Group ID to run GoAccess and Nginx as
  • TZ - Timezone to use

Example Nginx Configuration

location ^~ /goaccess {
    resolver 127.0.0.11 valid=30s;

    proxy_connect_timeout 1d;
    proxy_send_timeout 1d;
    proxy_read_timeout 1d;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

    set $upstream_goaccess goaccess;
    proxy_pass http://$upstream_goaccess:7889/;
}
Description
GoAccess Alpine Docker image powered by Nginx
Readme 47 KiB
Languages
Dockerfile 64.6%
Shell 35.4%