Commit 759e1bdd authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Adapted matomo.

parent e5eb020b
Pipeline #76961 passed with stages
in 22 minutes and 28 seconds
...@@ -17,7 +17,7 @@ export const matomo = matomoEnabled ? PiwikReactRouter({ ...@@ -17,7 +17,7 @@ export const matomo = matomoEnabled ? PiwikReactRouter({
url: matomoUrl, url: matomoUrl,
siteId: matomoSiteId, siteId: matomoSiteId,
clientTrackerName: 'stat.js', clientTrackerName: 'stat.js',
serverTrackerName: 'stat.php' serverTrackerName: 'stat'
}) : null }) : null
const keycloak = Keycloak({ const keycloak = Keycloak({
......
...@@ -7,10 +7,11 @@ services: ...@@ -7,10 +7,11 @@ services:
- MARIADB_USER=bn_matomo - MARIADB_USER=bn_matomo
- MARIADB_DATABASE=bitnami_matomo - MARIADB_DATABASE=bitnami_matomo
- ALLOW_EMPTY_PASSWORD=yes - ALLOW_EMPTY_PASSWORD=yes
volumes: volumes:
- /nomad/fairdi/db/matomo/mariadb:/bitnami - /nomad/fairdi/db/matomo/mariadb:/bitnami
matomo: matomo:
image: 'bitnami/matomo:3' build: ./matomo
image: 'fairdi/matomo:3'
container_name: nomad_matomo_matomo container_name: nomad_matomo_matomo
environment: environment:
- MARIADB_HOST=mariadb - MARIADB_HOST=mariadb
...@@ -22,5 +23,5 @@ services: ...@@ -22,5 +23,5 @@ services:
- '8001:80' - '8001:80'
depends_on: depends_on:
- mariadb - mariadb
volumes: volumes:
- /nomad/fairdi/db/matomo/matomo:/bitnami - /nomad/fairdi/db/matomo/matomo:/bitnami
FROM bitnami/matomo:3
RUN sed -i -e 's/action_name=/a=b\&action_name=/g' /opt/bitnami/matomo/piwik.js
RUN sed -i -e 's/&send_image=0/\&/g' /opt/bitnami/matomo/piwik.js
\ No newline at end of file
RewriteRule "^/fairdi/stat/stat.js$" "http://<the ip address>:8001/piwik.js" [p] RewriteRule "^/fairdi/stat/stat.js$" "http://<the ip address>:8001/piwik.js" [p]
RewriteRule "^/fairdi/stat/stat.php$" "http://<the ip address>:8001/piwik.php" [p] RewriteRule "^/fairdi/stat/stat$" "http://<the ip address>:8001/piwik.php" [p]
ProxyPass /fairdi/stat http://<the ip address>:8001 ProxyPass /fairdi/stat http://<the ip address>:8001
ProxyPassReverse /fairdi/stat http://<the ip address>:8001 ProxyPassReverse /fairdi/stat http://<the ip address>:8001
<Proxy http://<the ip address>:8001/app> <Proxy http://<the ip address>:8001/app>
......
location /fairdi/stat { location /fairdi/stat {
rewrite ^(.*)/stat.js$ $1/piwik.js; rewrite ^(.*)/stat.js$ $1/piwik.js;
rewrite ^(.*)/stat.php$ $1/piwik.php; rewrite ^(.*)/stat$ $1/piwik.php;
rewrite ^/fairdi/stat/(.*)$ /$1 break; rewrite ^/fairdi/stat/(.*)$ /$1 break;
proxy_set_header X-Forwarded-Uri /fairdi/stat; proxy_set_header X-Forwarded-Uri /fairdi/stat;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment