Browse Source

expose matomo over ssl

master
Giles Bradshaw 1 year ago
parent
commit
7856a1ea4b
3 changed files with 37 additions and 2 deletions
  1. +2
    -2
      docker-compose.yml
  2. +15
    -0
      ghost/post.hbs
  3. +20
    -0
      letsencrypt-nginx/conf/git.conf

+ 2
- 2
docker-compose.yml View File

@@ -22,6 +22,7 @@ services:
- REGISTRY_PROXY_PASS=http://registry-1:5000
- PORTAINER_PROXY_PASS=http://portainer:9000/
- PORTAINER_LOCATION=/portainer/
- MATOMO_PROXY_PASS=http://matomo/
- GIT_LOCATION=/git/
- BLOG_LOCATION=/
- CHAT_LOCATION=/chat/
@@ -43,6 +44,7 @@ services:
- 5000:5000
- 5001:5001
- 5005:5005
- 8080:5006
letsencrypt-drone:
# reverse proxy for drone in a subdomain
deploy:
@@ -346,8 +348,6 @@ services:
- matomo:/var/www/html:ro
# see https://github.com/matomo-org/matomo-nginx
- ./matomo/matomo.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 8080:80
networks:
- appnet
matomo-mariadb:


+ 15
- 0
ghost/post.hbs View File

@@ -176,6 +176,21 @@ into the {body} of the default.hbs template --}}

{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//sigyl.com:8080/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<script>
$(document).ready(function () {
// FitVids - start


+ 20
- 0
letsencrypt-nginx/conf/git.conf View File

@@ -40,6 +40,26 @@ server {
}
}

server {
# resolver 127.0.0.11 valid=30s; ## internal docker dns
#listen [::]:3011 default ipv6only=on; ## listen for ipv6
# listen 444
listen 5006 ssl;
# this should allow large docs
client_header_timeout 120s;
client_body_timeout 120s;
client_max_body_size 200m;
ssl_certificate /etc/letsencrypt/live/${SERVER_NAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${SERVER_NAME}/privkey.pem;
# save logs here
#access_log /var/log/nginx/access.log compression;
server_name ${SERVER_NAME};

location / {
proxy_pass ${MATOMO_PROXY_PASS};
}
}

server {
# resolver 127.0.0.11 valid=30s; ## internal docker dns
#listen [::]:3011 default ipv6only=on; ## listen for ipv6