feat: add goaccess and goaccess-cron services for Traefik access log analysis
This commit is contained in:
parent
ebc1ae7c8b
commit
b3313654ab
@ -2,5 +2,6 @@
|
||||
|
||||
- docker socket proxy
|
||||
- traefik
|
||||
- goaccess (analytics dashboard for Traefik logs)
|
||||
- redis
|
||||
- komodo
|
||||
|
||||
@ -90,6 +90,45 @@ services:
|
||||
- "traefik.http.middlewares.traefik-redir.redirectregex.regex=^https?://proxy.castaldifamily.com/$$"
|
||||
- "traefik.http.middlewares.traefik-redir.redirectregex.replacement=https://proxy.castaldifamily.com/dashboard/"
|
||||
|
||||
goaccess:
|
||||
image: nginx:alpine
|
||||
container_name: goaccess
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=America/New_York
|
||||
volumes:
|
||||
- /mnt/appdata/traefik/access-logs:/usr/share/nginx/html:ro
|
||||
ports:
|
||||
- "7890:80"
|
||||
networks:
|
||||
- proxy-net
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=proxy-net"
|
||||
- "traefik.http.routers.analytics.rule=Host(`analytics.castaldifamily.com`)"
|
||||
- "traefik.http.routers.analytics.entrypoints=websecure"
|
||||
- "traefik.http.routers.analytics.tls=true"
|
||||
- "traefik.http.routers.analytics.tls.certresolver=cloudflare"
|
||||
- "traefik.http.services.analytics.loadbalancer.server.port=80"
|
||||
|
||||
goaccess-cron:
|
||||
image: allinurl/goaccess:1.10
|
||||
container_name: goaccess-cron
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TZ=America/New_York
|
||||
volumes:
|
||||
- /mnt/appdata/traefik/access-logs:/opt/log
|
||||
entrypoint: /bin/sh
|
||||
# Regenerate report.html every 5 minutes
|
||||
command:
|
||||
- -c
|
||||
- |
|
||||
while true; do
|
||||
goaccess /opt/log/access.log --output=/opt/log/report.html --log-format=COMBINED
|
||||
sleep 300
|
||||
done
|
||||
|
||||
# --- MANAGEMENT ---
|
||||
komodo-db:
|
||||
image: mongo:8.2.6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user