v1.10.2 patches: continent persistence, city markers, dynamic map center
C changes: - gstorage.c: encode continent into root key for --persist --restore survival - gholder.c: decode continent from root + lat/lng storage - commons.h: add lat/lng fields to GMetrics struct - geoip2.c/geoip1.h: extract coordinates from MMDB - json.c: output lat/lng in geolocation JSON JS changes: - Remove cityIndex guard for static HTML city dots - TopoJSON lat/lng fallback for city coordinates - updateMap fallback city collection - Dynamic orthographic center based on visitor count - Mercator stays at [0,15] for full world view Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Docker-compose configuration
|
||||
|
||||
Here are two docker-compose configurations for goaccess which
|
||||
combine a static site with a real-time report of goaccess.
|
||||
The directories used are:
|
||||
|
||||
- `configs` - for the nginx and goaccess configuration
|
||||
- `public` - the files served by nginx - put your static site here
|
||||
- `logs` - nginx logs - there is no log rotation in place!
|
||||
|
||||
There are two flavors of the docker-compose files and the goaccess files:
|
||||
- `*.vanilla.*` which need you to take care of the TLS certificates
|
||||
- `*.traefik.*` using traefik for TLS and domain routing
|
||||
|
||||
## Vanilla
|
||||
|
||||
For the vanilla version, you'll have to do the following:
|
||||
|
||||
- put the TLS certificates into `configs/certs`, following the naming scheme
|
||||
in `goaccess.vanilla.conf`
|
||||
- route requests for the static webpage to port `8080`
|
||||
|
||||
## Traefik
|
||||
|
||||
The traefik version is setup to make it easier to do the routing.
|
||||
You don't need to take care of the TLS certificates, and the
|
||||
goaccess websocket gets its own subdomain.
|
||||
|
||||
To put it all together, the following environment is needed:
|
||||
- traefik configured according to [Traefik-101](https://ineiti.ch/posts/traefik-101/traefik-101/)
|
||||
- DNS configuration for two domain names pointing to your server's IP:
|
||||
- `yourdomain` for the static pages, e.g., a blog-post using [Hugo](https://gohugo.io/)
|
||||
- `goaccess.yourdomain` for the stats with goaccess
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
tz Europe/Zurich
|
||||
time-format %H:%M:%S
|
||||
date-format %Y-%m-%d
|
||||
log-format COMBINED
|
||||
log-file /srv/logs/access.log
|
||||
output /srv/report/report.html
|
||||
real-time-html true
|
||||
ws-url wss://goaccess.yourdomain
|
||||
port 443
|
||||
@@ -0,0 +1,10 @@
|
||||
tz Europe/Zurich
|
||||
time-format %H:%M:%S
|
||||
date-format %Y-%m-%d
|
||||
log-format COMBINED
|
||||
log-file /srv/logs/access.log
|
||||
output /srv/report/report.html
|
||||
real-time-html true
|
||||
ws-url wss://yourdomain
|
||||
ssl-cert /srv/certs/yourdomain.crt
|
||||
ssl-key /srv/certs/yourdomain.key
|
||||
@@ -0,0 +1,31 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./logs:/var/log/nginx
|
||||
- ./configs/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./public:/usr/share/nginx/html
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "fqdn=yourdomain"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
goaccess:
|
||||
image: allinurl/goaccess
|
||||
container_name: goaccess
|
||||
volumes:
|
||||
- ./configs/goaccess.traefik.conf:/srv/config/goaccess.conf
|
||||
- ./logs:/srv/logs
|
||||
- ./public:/srv/report
|
||||
command: ["--no-global-config", "--config-file=/srv/config/goaccess.conf"]
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "fqdn=goaccess.yourdomain"
|
||||
- "traefik.http.services.yourdomain-goaccess.loadbalancer.server.port=443"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external:
|
||||
name: traefik_traefik
|
||||
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
web:
|
||||
image: nginx
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- ./logs:/var/log/nginx
|
||||
- ./configs/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./public:/usr/share/nginx/html
|
||||
|
||||
goaccess:
|
||||
image: allinurl/goaccess
|
||||
ports:
|
||||
- 7890:7890
|
||||
volumes:
|
||||
- ./configs/goaccess.vanilla.conf:/srv/config/goaccess.conf
|
||||
- ./logs:/srv/logs
|
||||
- ./public:/srv/report
|
||||
- ./configs/certs:/srv/certs
|
||||
command: ["--no-global-config", "--config-file=/srv/config/goaccess.conf"]
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user