From a873f5d7a75cbd8cf197507f26526646ead46f28 Mon Sep 17 00:00:00 2001
From: LRVT <21357789+l4rm4nd@users.noreply.github.com>
Date: Sun, 22 Mar 2026 23:39:26 +0100
Subject: [PATCH] chore: add rybbit
---
README.md | 1 +
examples/rybbit/README.md | 3 +
examples/rybbit/docker-compose.yml | 170 +++++++++++++++++++++++++++++
3 files changed, 174 insertions(+)
create mode 100644 examples/rybbit/README.md
create mode 100644 examples/rybbit/docker-compose.yml
diff --git a/README.md b/README.md
index 5d5baf0..4e6db9d 100644
--- a/README.md
+++ b/README.md
@@ -366,6 +366,7 @@ A [blog](https://en.wikipedia.org/wiki/Blog) is a discussion or informational we
- [Matomo](examples/matomo) - Matomo is the leading Free/Libre open analytics platform.
- [Plausible](examples/plausible) - Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
+- [Rybbit](examples/rybbit) - An open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
### Security & Privacy
diff --git a/examples/rybbit/README.md b/examples/rybbit/README.md
new file mode 100644
index 0000000..f2b1fe1
--- /dev/null
+++ b/examples/rybbit/README.md
@@ -0,0 +1,3 @@
+# References
+
+- https://rybbit.com/docs/self-hosting
diff --git a/examples/rybbit/docker-compose.yml b/examples/rybbit/docker-compose.yml
new file mode 100644
index 0000000..a00ae4b
--- /dev/null
+++ b/examples/rybbit/docker-compose.yml
@@ -0,0 +1,170 @@
+services:
+
+ clickhouse:
+ image: clickhouse/clickhouse-server:25.4.2
+ container_name: rybbit-clickhouse
+ volumes:
+ - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/rybbit/clickhouse-data:/var/lib/clickhouse
+ configs:
+ - source: clickhouse_network
+ target: /etc/clickhouse-server/config.d/network.xml
+ - source: clickhouse_json
+ target: /etc/clickhouse-server/config.d/enable_json.xml
+ - source: clickhouse_logging
+ target: /etc/clickhouse-server/config.d/logging_rules.xml
+ - source: clickhouse_user_logging
+ target: /etc/clickhouse-server/config.d/user_logging.xml
+ environment:
+ - CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
+ - CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}
+ - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
+ healthcheck:
+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
+ interval: 3s
+ timeout: 5s
+ retries: 5
+ start_period: 10s
+ restart: unless-stopped
+ expose:
+ - 8123
+ networks:
+ - internal
+
+ postgres:
+ image: postgres:17-alpine
+ container_name: rybbit-postgres
+ environment:
+ - POSTGRES_USER=${POSTGRES_USER:-frog}
+ - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
+ - POSTGRES_DB=${POSTGRES_DB:-analytics}
+ volumes:
+ - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/rybbit/postgres-data:/var/lib/postgresql/data
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
+ interval: 3s
+ timeout: 5s
+ retries: 5
+ start_period: 10s
+ restart: unless-stopped
+ expose:
+ - 5432
+ networks:
+ - internal
+
+ backend:
+ image: ghcr.io/rybbit-io/rybbit-backend:${IMAGE_TAG:-latest}
+ container_name: rybbit-backend
+ expose:
+ - 3001
+ environment:
+ - NODE_ENV=production
+ - CLICKHOUSE_HOST=http://clickhouse:8123
+ - CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}
+ - CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD:-frog}
+ - POSTGRES_HOST=postgres
+ - POSTGRES_PORT=5432
+ - POSTGRES_DB=${POSTGRES_DB:-analytics}
+ - POSTGRES_USER=${POSTGRES_USER:-frog}
+ - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-frog}
+ - BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
+ - BASE_URL=${BASE_URL}
+ - DISABLE_SIGNUP=${DISABLE_SIGNUP}
+ - DISABLE_TELEMETRY=${DISABLE_TELEMETRY}
+ - MAPBOX_TOKEN=${MAPBOX_TOKEN}
+ depends_on:
+ clickhouse:
+ condition: service_healthy
+ postgres:
+ condition: service_started
+ healthcheck:
+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3001/api/health"]
+ interval: 3s
+ timeout: 5s
+ retries: 5
+ start_period: 10s
+ restart: unless-stopped
+ #networks:
+ # - internal
+ # - proxy
+ #labels:
+ # - traefik.enable=true
+ # - traefik.docker.network=proxy
+ # - traefik.http.routers.rybbit-api.rule=Host(`rybbit.example.com`) && PathPrefix(`/api`)
+ # - traefik.http.routers.rybbit-api.priority=100
+ # - traefik.http.services.rybbit-api.loadbalancer.server.port=3001
+ # - traefik.http.routers.rybbit-api.middlewares=local-ipwhitelist@file
+
+ client:
+ image: ghcr.io/rybbit-io/rybbit-client:${IMAGE_TAG:-latest}
+ container_name: rybbit-client
+ expose:
+ - 3002
+ environment:
+ - NODE_ENV=production
+ - NEXT_PUBLIC_BACKEND_URL=${BASE_URL}
+ - NEXT_PUBLIC_DISABLE_SIGNUP=${DISABLE_SIGNUP}
+ depends_on:
+ - backend
+ restart: unless-stopped
+ #networks:
+ # - proxy
+ # - internal
+ #labels:
+ # - traefik.enable=true
+ # - traefik.docker.network=proxy
+ # - traefik.http.routers.rybbit.rule=Host(`rybbit.example.com`)
+ # - traefik.http.services.rybbit.loadbalancer.server.port=3002
+ # # Optional part for traefik middlewares
+ # - traefik.http.routers.rybbit.middlewares=local-ipwhitelist@file
+
+configs:
+ clickhouse_network:
+ content: |
+
+ 0.0.0.0
+
+
+ clickhouse_json:
+ content: |
+
+
+ 1
+
+
+
+ clickhouse_logging:
+ content: |
+
+
+ warning
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ clickhouse_user_logging:
+ content: |
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+#networks:
+# proxy:
+# external: true
+# internal:
+# internal: true