Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added selfhosted scripts

Blue Mouse4babff8701f7
diff --git a/deployment/50-substitute-env-variables.sh b/deployment/50-substitute-env-variables.sh
new file mode 100644
index 000000000..8078f8857
--- /dev/null
+++ b/deployment/50-substitute-env-variables.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# WARNING: THIS FILE MUST BE SAVED WITH LF LINE ENDINGS, OTHERWISE IT WONT WORK
+set -o errexit
+set -o nounset
+set -o pipefail
+
+: "${API_URL}"
+
+cat <<EOF > /usr/share/nginx/html/env.js
+window.env = {};
+window.env.API_URL = "$API_URL";
+EOF
\ No newline at end of file
diff --git a/deployment/default.conf b/deployment/default.conf
new file mode 100644
index 000000000..df2ddfddd
--- /dev/null
+++ b/deployment/default.conf
@@ -0,0 +1,17 @@
+server {
+ listen 80;
+ add_header Cross-Origin-Embedder-Policy "require-corp; report-to='default'";
+ add_header Cross-Origin-Opener-Policy "same-site; report-to='default'";
+ add_header Cross-Origin-Resource-Policy "same-site";
+ add_header Permissions-Policy "interest-cohort=()";
+ add_header Referrer-Policy "strict-origin-when-cross-origin";
+ add_header X-Frame-Options "DENY";
+ add_header X-Powered-By "Mountain Dew";
+ add_header X-XSS-Protection "1; mode=block";
+
+ location / {
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+ try_files $uri $uri/ /index.html =404;
+ }
+}
\ No newline at end of file