all-sub-filters
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Giles Bradshaw 2020-05-05 14:15:44 +01:00
parent 27c7a0a11d
commit 9b9b2f9034
1 changed files with 153 additions and 0 deletions

View File

@ -36,6 +36,23 @@ server {
server_name ${SERVER_NAME}; server_name ${SERVER_NAME};
location / { location / {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
proxy_pass ${COMMENTO_PROXY_PASS}; proxy_pass ${COMMENTO_PROXY_PASS};
} }
} }
@ -57,6 +74,23 @@ server {
server_name ${SERVER_NAME}; server_name ${SERVER_NAME};
location / { location / {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
proxy_pass ${DRONE_PROXY_PASS}; proxy_pass ${DRONE_PROXY_PASS};
} }
} }
@ -146,6 +180,23 @@ server {
} }
location ~ ${MATOMO_LOCATION}(.*) { location ~ ${MATOMO_LOCATION}(.*) {
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
set ${DOLLAR}upstream ${MATOMO_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${MATOMO_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_set_header Host ${DOLLAR}http_host; proxy_set_header Host ${DOLLAR}http_host;
proxy_set_header X-Real-IP ${DOLLAR}remote_addr; proxy_set_header X-Real-IP ${DOLLAR}remote_addr;
@ -157,6 +208,23 @@ server {
location ~ ${CHAT_LOCATION}sockjs(.*) { location ~ ${CHAT_LOCATION}sockjs(.*) {
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
set ${DOLLAR}upstream ${CHAT_PROXY_PASS}chat/sockjs${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${CHAT_PROXY_PASS}chat/sockjs${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_pass ${DOLLAR}upstream; proxy_pass ${DOLLAR}upstream;
proxy_http_version 1.1; proxy_http_version 1.1;
@ -170,11 +238,45 @@ server {
proxy_redirect off; proxy_redirect off;
} }
location ~ ${CHAT_LOCATION}(.*) { location ~ ${CHAT_LOCATION}(.*) {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
set ${DOLLAR}upstream ${CHAT_PROXY_PASS}chat/${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${CHAT_PROXY_PASS}chat/${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_pass ${DOLLAR}upstream; proxy_pass ${DOLLAR}upstream;
} }
location ~ ${REMOTE_LOCATION}websocket-tunnel(.*) { location ~ ${REMOTE_LOCATION}websocket-tunnel(.*) {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}websocket-tunnel${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}websocket-tunnel${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_pass ${DOLLAR}upstream; proxy_pass ${DOLLAR}upstream;
@ -189,16 +291,67 @@ server {
proxy_redirect off; proxy_redirect off;
} }
location ~ ${REMOTE_LOCATION}(.*) { location ~ ${REMOTE_LOCATION}(.*) {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${REMOTE_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_pass ${DOLLAR}upstream; proxy_pass ${DOLLAR}upstream;
} }
location ~ ${COMMENTO_LOCATION}(.*) { location ~ ${COMMENTO_LOCATION}(.*) {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
set ${DOLLAR}upstream ${COMMENTO_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args; set ${DOLLAR}upstream ${COMMENTO_PROXY_PASS}${DOLLAR}1${DOLLAR}is_args${DOLLAR}args;
proxy_pass ${DOLLAR}upstream; proxy_pass ${DOLLAR}upstream;
} }
location ~ ${BLOG_LOCATION}(.*) { location ~ ${BLOG_LOCATION}(.*) {
sub_filter '</head>' '<!-- 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="//${SERVER_NAME}${MATOMO_LOCATION}";
_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 -->
</head>';
resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns resolver 127.0.0.11 ipv6=off valid=30s; ## internal docker dns
proxy_set_header Host ${DOLLAR}http_host; proxy_set_header Host ${DOLLAR}http_host;
proxy_set_header X-Real-IP ${DOLLAR}remote_addr; proxy_set_header X-Real-IP ${DOLLAR}remote_addr;