Adds matomo for analytics

This commit is contained in:
Abhinav Sarkar 2018-07-07 16:17:01 +00:00
parent a2680855c1
commit dd0666a1af
3 changed files with 76 additions and 0 deletions

View File

@ -1,4 +1,6 @@
version: '3'
volumes:
matomo:
services:
wallabag:
image: wallabag/wallabag
@ -29,6 +31,12 @@ services:
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- ./postgres-data:/var/lib/postgresql/data
mariadb:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: ${MR_PASSWORD}
volumes:
- ./mariadb-data:/var/lib/mysql
nginx:
image: nginx:1.15
environment:
@ -44,6 +52,7 @@ services:
- ./nginx-conf:/etc/nginx/conf.d:ro
- ./nginx-log:/var/log/nginx
- ./certs:/etc/nginx/certs:ro
- matomo:/var/www/html
smtp:
build:
context: ./smtp
@ -92,3 +101,8 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .:/opt/space
matomo:
image: matomo:3.5.1-fpm
volumes:
- ./matomo-config:/var/www/html/config
- matomo:/var/www/html

61
nginx-conf/matomo.conf Normal file
View File

@ -0,0 +1,61 @@
upstream matomo_backend {
server matomo:9000;
}
server {
listen 443 ssl;
server_name anna.abhinavsarkar.net;
ssl_certificate /etc/nginx/certs/fullchain1.pem;
ssl_certificate_key /etc/nginx/certs/privkey1.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
root /var/www/html/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~ \.php$ {
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_intercept_errors on;
fastcgi_pass matomo_backend;
}
}
server {
listen 80;
server_name anna.abhinavsarkar.net;
return 301 https://$host$request_uri;
}

View File

@ -9,6 +9,7 @@ Environment="WB_PASSWORD="
Environment="PH_PASSWORD="
Environment="PH_SERVER_IP="
Environment="GT_SECRET_KEY="
Environment="MR_PASSWORD="
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/abhinav/space