From ada534f8d08fba47f1b706dd4d7082232df6f2ab Mon Sep 17 00:00:00 2001
From: DrMxrcy <58747968+DrMxrcy@users.noreply.github.com>
Date: Mon, 8 May 2023 14:38:43 -0400
Subject: [PATCH] Add Plausible (#475)
* Add Plausible Analytics
* Update config.json
* Update docker-compose.yml
* Update docker-compose.yml
* Update docker-compose.yml
* Update docker-compose.yml
* Update Secret Key
* Remove User Registration, Done Via UI
* Update docker-compose.yml
* Update docker-compose.yml
* Update config.json
---
README.md | 1 +
apps/plausible/config.json | 37 ++++++++++++
.../data/clickhouse/clickhouse-config.xml | 16 +++++
.../clickhouse/clickhouse-user-config.xml | 8 +++
apps/plausible/docker-compose.yml | 56 ++++++++++++++++++
apps/plausible/metadata/description.md | 25 ++++++++
apps/plausible/metadata/logo.jpg | Bin 0 -> 6502 bytes
7 files changed, 143 insertions(+)
create mode 100644 apps/plausible/config.json
create mode 100644 apps/plausible/data/clickhouse/clickhouse-config.xml
create mode 100644 apps/plausible/data/clickhouse/clickhouse-user-config.xml
create mode 100644 apps/plausible/docker-compose.yml
create mode 100644 apps/plausible/metadata/description.md
create mode 100644 apps/plausible/metadata/logo.jpg
diff --git a/README.md b/README.md
index 67db7581..9d6b87c6 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,7 @@ This is the official repository for the Tipi App Store. It contains all the apps
- [Peppermint](https://github.com/Peppermint-Lab/peppermint) - An open source ticket management & help desk solution.
- [Photoprism](https://github.com/photoprism/photoprism) - AI-Powered Photos App for the Decentralized Web. We are on a mission to protect your freedom and privacy.
- [Pihole](https://github.com/pi-hole/pi-hole) - A black hole for Internet advertisements
+- [Plausible](https://github.com/plausible/analytics) - Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
- [Plex](https://github.com/plexinc/pms-docker) - Stream Movies & TV Shows
- [PodFetch](https://github.com/SamTV12345/PodFetch) - A sleek and efficient podcast downloader.
- [Portainer](https://github.com/portainer/portainer) - Making Docker and Kubernetes management easy.
diff --git a/apps/plausible/config.json b/apps/plausible/config.json
new file mode 100644
index 00000000..afbc7968
--- /dev/null
+++ b/apps/plausible/config.json
@@ -0,0 +1,37 @@
+{
+ "$schema": "../schema.json",
+ "name": "Plausible",
+ "port": 8190,
+ "available": true,
+ "exposable": true,
+ "id": "plausible",
+ "tipi_version": 1,
+ "version": "v1.5.1",
+ "categories": ["utilities"],
+ "description": "Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.",
+ "short_desc": "Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.",
+ "author": "Plausible",
+ "source": "https://github.com/plausible/analytics",
+ "form_fields": [
+ {
+ "type": "random",
+ "label": "Plausible Secret Key",
+ "min": 64,
+ "env_variable": "PLAUSIBLE_SECRET_KEY_BASE"
+ },
+ {
+ "type": "random",
+ "label": "Plausible DB Key",
+ "min": 32,
+ "env_variable": "PLAUSIBLE_DB_PASSWORD"
+ },
+ {
+ "type": "boolean",
+ "label": "Disable User Registration",
+ "hint": "Check to enable Registration",
+ "default": "true",
+ "required": true,
+ "env_variable": "PLAUSIBLE_DISABLE_REGISTRATION"
+ }
+ ]
+}
diff --git a/apps/plausible/data/clickhouse/clickhouse-config.xml b/apps/plausible/data/clickhouse/clickhouse-config.xml
new file mode 100644
index 00000000..dc1e36b7
--- /dev/null
+++ b/apps/plausible/data/clickhouse/clickhouse-config.xml
@@ -0,0 +1,16 @@
+
+
+ warning
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/plausible/data/clickhouse/clickhouse-user-config.xml b/apps/plausible/data/clickhouse/clickhouse-user-config.xml
new file mode 100644
index 00000000..ae6a6b94
--- /dev/null
+++ b/apps/plausible/data/clickhouse/clickhouse-user-config.xml
@@ -0,0 +1,8 @@
+
+
+
+ 0
+ 0
+
+
+
\ No newline at end of file
diff --git a/apps/plausible/docker-compose.yml b/apps/plausible/docker-compose.yml
new file mode 100644
index 00000000..b566b5ba
--- /dev/null
+++ b/apps/plausible/docker-compose.yml
@@ -0,0 +1,56 @@
+version: "3.7"
+services:
+ plausible-db:
+ # supported versions are 12, 13, and 14
+ image: postgres:14-alpine
+ container_name: plausible-db
+ restart: always
+ networks:
+ - tipi_main_network
+ volumes:
+ - ${APP_DATA_DIR}/data/database/:/var/lib/postgresql/data
+ environment:
+ - POSTGRES_PASSWORD=${PLAUSIBLE_DB_PASSWORD}
+ - POSTGRES_USER=tipi
+ - POSTGRES_DB=plausible-db
+
+ plausible-events-db:
+ container_name: plausible-events-db
+ image: clickhouse/clickhouse-server:22.6-alpine
+ restart: always
+ networks:
+ - tipi_main_network
+ volumes:
+ - ${APP_DATA_DIR}/data/plausible-event-data:/var/lib/clickhouse
+ - ${APP_DATA_DIR}/data/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
+ - ${APP_DATA_DIR}/data/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
+ ulimits:
+ nofile:
+ soft: 262144
+ hard: 262144
+
+ plausible:
+ container_name: plausible
+ image: plausible/analytics:v1.5.1
+ restart: always
+ command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
+ depends_on:
+ - plausible-db
+ - plausible-events-db
+ ports:
+ - ${APP_PORT}:8000
+ environment:
+ - BASE_URL=${APP_PROTOCOL:-http}://${APP_DOMAIN}
+ - SECRET_KEY_BASE=${PLAUSIBLE_SECRET_KEY_BASE}
+ - DATABASE_URL=postgres://tipi:${PLAUSIBLE_DB_PASSWORD}@plausible-db:5432/plausible-db
+ - CLICKHOUSE_DATABASE_URL=http://plausible-events-db:8123/plausible_events_db
+ - DISABLE_REGISTRATION=${PLAUSIBLE_DISABLE_REGISTRATION}
+ networks:
+ - tipi_main_network
+ labels:
+ traefik.enable: ${APP_EXPOSED}
+ traefik.http.routers.plausible.rule: Host(`${APP_DOMAIN}`)
+ traefik.http.routers.plausible.entrypoints: websecure
+ traefik.http.routers.plausible.service: plausible
+ traefik.http.routers.plausible.tls.certresolver: myresolver
+ traefik.http.services.plausible.loadbalancer.server.port: 8000
diff --git a/apps/plausible/metadata/description.md b/apps/plausible/metadata/description.md
new file mode 100644
index 00000000..3e243be7
--- /dev/null
+++ b/apps/plausible/metadata/description.md
@@ -0,0 +1,25 @@
+[![Plausible Analytics](https://raw.githubusercontent.com/plausible/docs/master/static/img/plausible-analytics-icon-top.png)](https://plausible.io/)
+
+[Simple Metrics](https://plausible.io/simple-web-analytics) | [Lightweight Script](https://plausible.io/lightweight-web-analytics) | [Privacy Focused](https://plausible.io/privacy-focused-web-analytics) | [Open Source](https://plausible.io/open-source-website-analytics) | [Docs](https://plausible.io/docs) | [Contributing](https://github.com/plausible/analytics/blob/master/CONTRIBUTING.md)
+
+
+[Plausible Analytics](https://plausible.io/) is a simple, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host or have us run Plausible for you in the cloud. Here's [the live demo of our own website stats](https://plausible.io/plausible.io). Made and hosted in the EU 🇪🇺
+
+We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.
+
+[![Plausible Analytics](https://camo.githubusercontent.com/74a68bf1e55052517b1eab2e7ec8fb12a2f065e5cd6f12dd2a5002f6dcdc0d82/68747470733a2f2f706c61757369626c652e696f2f646f63732f696d672f706c61757369626c652d616e616c79746963732e706e67)](https://camo.githubusercontent.com/74a68bf1e55052517b1eab2e7ec8fb12a2f065e5cd6f12dd2a5002f6dcdc0d82/68747470733a2f2f706c61757369626c652e696f2f646f63732f696d672f706c61757369626c652d616e616c79746963732e706e67)
+
+## Why Plausible?
+
+Here's what makes Plausible a great Google Analytics alternative and why we're trusted by thousands of paying subscribers to deliver their website and business insights:
+
+- **Clutter Free**: Plausible Analytics provides [simple web analytics](https://plausible.io/simple-web-analytics) and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
+- **GDPR/CCPA/PECR compliant**: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. [Read more about our data policy](https://plausible.io/data-policy)
+- **Lightweight**: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is [45x smaller](https://plausible.io/lightweight-web-analytics), making your website quicker to load.
+- **Email or Slack reports**: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
+- **Open website stats**: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them.
+- **Define key goals and track conversions**: Set custom events or page URLs as your goals and see how they convert over time to understand and identify the trends that matter. Includes easy ways to track outbound link clicks and 404 error pages.
+- **Search keywords**: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
+- **SPA support**: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See [our documentation](https://plausible.io/docs/hash-based-routing).
+
+Interested to learn more? [Read more on our website](https://plausible.io), learn more about the team and the goals of the project on [our about page](https://plausible.io/about) or explore [the documentation](https://plausible.io/docs).
\ No newline at end of file
diff --git a/apps/plausible/metadata/logo.jpg b/apps/plausible/metadata/logo.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..27bf655b92736e26ef1841742a1ea7061b0c21f8
GIT binary patch
literal 6502
zcmb_gcT^P5lb>bDaaV#Muq4SjBcLo%a!wKj6a~pFIS5EbKyuD385D_15S0u{j*F6m
zAgl-og2)Z}{oVcUy}N(zUCqAfu1{5WPt|nQZ1u(L#S#EhS5Z>|AP@k6fERG_8(>m&
zb$0W(@9BB}9NB|NcDbXd7Qj(IBf`C$fXP#x8DT-w>m!@fgAu$@rnlTi{7LmAScVo*ag1LsWT;z
zfef0x0Gj}-A@C0Lx^<+6fa3&~jtW6mT#%P23mix`c9R)op;?WE>W%_vU;d8^p!hC`N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