feat: Remove matomo and used goaccess to generate static analytics

This commit is contained in:
Simon 2020-03-17 11:19:40 +01:00
parent e1e6bcd9ea
commit 0c9e4b41b3
8 changed files with 7 additions and 83 deletions

View File

@ -1,5 +1,4 @@
FROM nginx FROM kosssi/nginx-lowtech:0.0.2
COPY nginx-default.conf /etc/nginx/conf.d/default.conf
COPY nginx-compression.conf /etc/nginx/conf.d/compression.conf # Copie des sources du site
COPY nginx-hide.conf /etc/nginx/conf.d/hide.conf
COPY public /usr/share/nginx/html COPY public /usr/share/nginx/html

View File

@ -35,20 +35,6 @@ services:
traefik.http.routers.histoiredunpied-redirect-www-https.tls.certResolver: "letsencrypt" traefik.http.routers.histoiredunpied-redirect-www-https.tls.certResolver: "letsencrypt"
traefik.http.routers.histoiredunpied-redirect-www-https.middlewares: "redirect-www@docker" traefik.http.routers.histoiredunpied-redirect-www-https.middlewares: "redirect-www@docker"
matomo:
container_name: ${NAME}_matomo
image: kosssi/matomo-log-analytics
depends_on:
- histoiredunpied
environment:
MATOMO_URL: ${MATOMO_URL}
MATOMO_IDSITE: ${MATOMO_IDSITE}
MATOMO_TOKEN_AUTH: ${MATOMO_TOKEN_AUTH}
LOG_PATH: ${LOG_PATH}
CRON_FREQUENCY: ${CRON_FREQUENCY}
volumes:
- histoiredunpied-log-volume:/var/log/nginx
networks: networks:
default: default:
external: external:

View File

@ -1,8 +0,0 @@
#Compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;

View File

@ -1,55 +0,0 @@
# Expires map
map $sent_http_content_type $expires {
default off;
text/html 7d;
text/css max;
application/javascript max;
~image/ max;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# https://gtmetrix.com/specify-a-character-set-early.html
# https://www.cyberciti.biz/faq/nginx-set-http-content-type-response-header-to-charset-utf8/
charset UTF-8;
add_header X-UA-Compatible "IE=Edge,chrome=1";
# https://www.justegeek.fr/proteger-un-peu-plus-son-site-avec-la-balise-x-content-type-options/
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options DENY;
add_header Referrer-Policy "strict-origin-when-cross-origin";
# https://scotthelme.co.uk/content-security-policy-an-introduction/
add_header Content-Security-Policy "script-src 'self'";
# https://scotthelme.co.uk/a-new-security-header-feature-policy/
#add_header Feature-Policy "vibrate none";
# https://scotthelme.co.uk/hsts-the-missing-link-in-tls/
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
#Caching (save html pages for 7 days, rest as long as possible, no caching on frontpage)
expires $expires;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -1 +0,0 @@
server_tokens off;

View File

@ -9,6 +9,7 @@
"favicon": "convert static/icon.png -resize 32x32 -colors 16 \\( -clone 0 -resize 16x16 -extent 16x16 \\) \\( -clone 0 -resize 32x32 -extent 32x32 \\) -delete 0 static/favicon.ico", "favicon": "convert static/icon.png -resize 32x32 -colors 16 \\( -clone 0 -resize 16x16 -extent 16x16 \\) \\( -clone 0 -resize 32x32 -extent 32x32 \\) -delete 0 static/favicon.ico",
"svgo": "svgo */**.svg", "svgo": "svgo */**.svg",
"deploy": "docker-compose up -d --build", "deploy": "docker-compose up -d --build",
"stats": "./themes/hugo-theme-lowtech/scripts/stats.sh",
"ftp-deploy": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'mirror -e -R ./public /www ; quit'", "ftp-deploy": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'mirror -e -R ./public /www ; quit'",
"ftp-htaccess": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'put ./.htaccess ; quit'", "ftp-htaccess": "lftp -u $HISTOIREDUNPIED_FTP_USER,$HISTOIREDUNPIED_FTP_PASSWORD $HISTOIREDUNPIED_FTP_HOST -e 'put ./.htaccess ; quit'",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"

2
static/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /stats.html

@ -1 +1 @@
Subproject commit 8da32f8afd91ef803551fdf592f2d3efc70773c6 Subproject commit 5c3965e4c27002e7390b27d8eb784536bc7cac52