Add analytics. Invert gitignore

This commit is contained in:
Thomas Lovén 2021-12-04 23:13:12 +01:00
parent 4d87b20740
commit ead848575f
3 changed files with 24 additions and 9 deletions

16
.gitignore vendored
View File

@ -1,12 +1,10 @@
.env **/*
!.gitignore
traefik/acme.json !README.md
traefik/certs/ !docker-compose.yaml
traefik/traefik.log
traefik/config/old.yaml
authelia/db.sqlite3 !traefik/traefik.yaml
authelia/notification.txt !traefik/config/*
authelia/users_database.yml
homer/ !authelia/configuration.yaml

View File

@ -43,6 +43,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ./traefik:/data - ./traefik:/data
- /var/log/traefik:/log
healthcheck: healthcheck:
# Sometimes, traefik loses connection to authelia. The only thing that works then is a restart, handled by autoheal. # Sometimes, traefik loses connection to authelia. The only thing that works then is a restart, handled by autoheal.
# I haven't checked for quite a while if this is still a problem, but might as well leave it in there. # I haven't checked for quite a while if this is still a problem, but might as well leave it in there.
@ -112,6 +113,19 @@ services:
traefik.http.routers.dozzle.tls.certResolver: le traefik.http.routers.dozzle.tls.certResolver: le
traefik.http.routers.dozzle.middlewares: auth@file traefik.http.routers.dozzle.middlewares: auth@file
analytics:
image: gregyankovoy/goaccess
volumes:
- ./analytics:/config
- /var/log/traefik:/opt/log
networks:
web:
labels:
traefik.enable: true
traefik.http.routers.analytics.rule: Host(`analytics.${PRIVATE_DOMAIN}`)
traefik.http.routers.analytics.tls.certResolver: le
traefik.http.routers.analytics.middlewares: auth@file
# labels: # labels:
# The following three labels are always needed. Make sure to replace <SERVICE> with a unique name # The following three labels are always needed. Make sure to replace <SERVICE> with a unique name

View File

@ -15,6 +15,9 @@ log:
level: INFO level: INFO
# level: DEBUG # level: DEBUG
accessLog:
filePath: /log/access.log
entryPoints: entryPoints:
web: web:
address: :80 address: :80