From b859807d613acb4c8c66385e8aa51f1c2ebf901e Mon Sep 17 00:00:00 2001
From: zehjotkah <111518041+zehjotkah@users.noreply.github.com>
Date: Tue, 16 Sep 2025 20:26:44 +0100
Subject: [PATCH 1/3] added rybbit service template
---
public/svgs/rybbit.svg | 1 +
templates/compose/rybbit.yaml | 138 ++++++++++++++++++++++++++++++++++
2 files changed, 139 insertions(+)
create mode 100644 public/svgs/rybbit.svg
create mode 100644 templates/compose/rybbit.yaml
diff --git a/public/svgs/rybbit.svg b/public/svgs/rybbit.svg
new file mode 100644
index 000000000..5715b29bd
--- /dev/null
+++ b/public/svgs/rybbit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/templates/compose/rybbit.yaml b/templates/compose/rybbit.yaml
new file mode 100644
index 000000000..c86299faf
--- /dev/null
+++ b/templates/compose/rybbit.yaml
@@ -0,0 +1,138 @@
+# documentation: https://rybbit.io/docs
+# slogan: Open-source, privacy-first web analytics.
+# tags: analytics,web,privacy,self-hosted,clickhouse,postgres
+# logo: svgs/rybbit.svg
+# port: 3000
+
+services:
+ rybbit:
+ image: 'ghcr.io/rybbit-io/rybbit-client:latest'
+ container_name: rybbit-client
+ environment:
+ - NODE_ENV=production
+ - 'NEXT_PUBLIC_BACKEND_URL=${SERVICE_URL_RYBBIT}'
+ - 'NEXT_PUBLIC_DISABLE_SIGNUP=${DISABLE_SIGNUP:-false}'
+ depends_on:
+ - rybbit_backend
+ restart: unless-stopped
+
+ rybbit_backend:
+ image: 'ghcr.io/rybbit-io/rybbit-backend:latest'
+ container_name: rybbit-backend
+ environment:
+ - NODE_ENV=production
+ - TRUST_PROXY=true
+ - 'BASE_URL=${SERVICE_URL_RYBBIT}'
+ # --- Coolify-Managed Secrets ---
+ - 'CLICKHOUSE_PASSWORD=${SERVICE_PASSWORD_CLICKHOUSE}'
+ - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}'
+ - 'BETTER_AUTH_SECRET=${SERVICE_BASE64_64_BACKEND}'
+ # --- User Settings ---
+ - 'DISABLE_SIGNUP=${DISABLE_SIGNUP:-false}'
+ - 'DISABLE_TELEMETRY=${DISABLE_TELEMETRY:-true}'
+ # --- Internal Config ---
+ - 'CLICKHOUSE_HOST=http://rybbit_clickhouse:8123'
+ - CLICKHOUSE_USER=default
+ - CLICKHOUSE_DB=analytics
+ - POSTGRES_HOST=rybbit_postgres
+ - POSTGRES_PORT=5432
+ - POSTGRES_DB=analytics
+ - POSTGRES_USER=frog
+ depends_on:
+ rybbit_clickhouse:
+ condition: service_healthy
+ rybbit_postgres:
+ condition: service_healthy
+ healthcheck:
+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3001/api/health"]
+ interval: 30s
+ timeout: 10s
+ retries: 3
+ start_period: 10s
+ restart: unless-stopped
+
+ rybbit_postgres:
+ image: 'postgres:17.4'
+ container_name: rybbit-postgres
+ environment:
+ - POSTGRES_DB=analytics
+ - POSTGRES_USER=frog
+ - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}'
+ volumes:
+ - 'postgres_data:/var/lib/postgresql/data'
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
+ interval: 30s
+ timeout: 10s
+ retries: 3
+ restart: unless-stopped
+
+ rybbit_clickhouse:
+ image: 'clickhouse/clickhouse-server:25.4.2'
+ container_name: rybbit-clickhouse
+ environment:
+ - CLICKHOUSE_DB=analytics
+ - CLICKHOUSE_USER=default
+ - 'CLICKHOUSE_PASSWORD=${SERVICE_PASSWORD_CLICKHOUSE}'
+ healthcheck:
+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
+ interval: 30s
+ timeout: 10s
+ retries: 3
+ start_period: 10s
+ restart: unless-stopped
+ volumes:
+ - 'clickhouse_data:/var/lib/clickhouse'
+ - type: bind
+ source: ./clickhouse_config/enable_json.xml
+ target: /etc/clickhouse-server/config.d/enable_json.xml
+ content: |
+
+
+ 1
+
+
+ - type: bind
+ source: ./clickhouse_config/logging_rules.xml
+ target: /etc/clickhouse-server/config.d/logging_rules.xml
+ content: |
+
+
+ warning
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ - type: bind
+ source: ./clickhouse_config/network.xml
+ target: /etc/clickhouse-server/config.d/network.xml
+ content: |
+
+ 0.0.0.0
+
+ - type: bind
+ source: ./clickhouse_config/user_logging.xml
+ target: /etc/clickhouse-server/config.d/user_logging.xml
+ content: |
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+volumes:
+ postgres_data:
+ clickhouse_data:
From 65f60a2ca2399b8a070799ec0769802159e32269 Mon Sep 17 00:00:00 2001
From: zehjotkah <111518041+zehjotkah@users.noreply.github.com>
Date: Wed, 17 Sep 2025 19:30:12 +0100
Subject: [PATCH 2/3] Update rybbit.yaml
- fixed port
- removed unnecessary stuff (container_name, restart)
- added client/frontend healthcheck
- DRY for hardcoded values
---
templates/compose/rybbit.yaml | 39 +++++++++++++++--------------------
1 file changed, 17 insertions(+), 22 deletions(-)
diff --git a/templates/compose/rybbit.yaml b/templates/compose/rybbit.yaml
index c86299faf..1b3ce16af 100644
--- a/templates/compose/rybbit.yaml
+++ b/templates/compose/rybbit.yaml
@@ -2,23 +2,27 @@
# slogan: Open-source, privacy-first web analytics.
# tags: analytics,web,privacy,self-hosted,clickhouse,postgres
# logo: svgs/rybbit.svg
-# port: 3000
+# port: 3002
services:
rybbit:
image: 'ghcr.io/rybbit-io/rybbit-client:latest'
- container_name: rybbit-client
environment:
+ - SERVICE_URL_RYBBIT_3002
- NODE_ENV=production
- 'NEXT_PUBLIC_BACKEND_URL=${SERVICE_URL_RYBBIT}'
- 'NEXT_PUBLIC_DISABLE_SIGNUP=${DISABLE_SIGNUP:-false}'
depends_on:
- rybbit_backend
- restart: unless-stopped
+ healthcheck:
+ test: ["CMD-SHELL", "nc -z 127.0.0.1 3002"]
+ interval: 30s
+ timeout: 10s
+ retries: 3
+ start_period: 10s
rybbit_backend:
image: 'ghcr.io/rybbit-io/rybbit-backend:latest'
- container_name: rybbit-backend
environment:
- NODE_ENV=production
- TRUST_PROXY=true
@@ -32,12 +36,12 @@ services:
- 'DISABLE_TELEMETRY=${DISABLE_TELEMETRY:-true}'
# --- Internal Config ---
- 'CLICKHOUSE_HOST=http://rybbit_clickhouse:8123'
- - CLICKHOUSE_USER=default
- - CLICKHOUSE_DB=analytics
+ - 'CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}'
+ - 'CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}'
- POSTGRES_HOST=rybbit_postgres
- POSTGRES_PORT=5432
- - POSTGRES_DB=analytics
- - POSTGRES_USER=frog
+ - 'POSTGRES_DB=${POSTGRES_DB:-analytics}'
+ - 'POSTGRES_USER=${POSTGRES_USER:-frog}'
depends_on:
rybbit_clickhouse:
condition: service_healthy
@@ -49,14 +53,12 @@ services:
timeout: 10s
retries: 3
start_period: 10s
- restart: unless-stopped
rybbit_postgres:
image: 'postgres:17.4'
- container_name: rybbit-postgres
environment:
- - POSTGRES_DB=analytics
- - POSTGRES_USER=frog
+ - 'POSTGRES_DB=${POSTGRES_DB:-analytics}'
+ - 'POSTGRES_USER=${POSTGRES_USER:-frog}'
- 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}'
volumes:
- 'postgres_data:/var/lib/postgresql/data'
@@ -65,14 +67,12 @@ services:
interval: 30s
timeout: 10s
retries: 3
- restart: unless-stopped
rybbit_clickhouse:
image: 'clickhouse/clickhouse-server:25.4.2'
- container_name: rybbit-clickhouse
environment:
- - CLICKHOUSE_DB=analytics
- - CLICKHOUSE_USER=default
+ - 'CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}'
+ - 'CLICKHOUSE_USER=${CLICKHOUSE_USER:-default}'
- 'CLICKHOUSE_PASSWORD=${SERVICE_PASSWORD_CLICKHOUSE}'
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping"]
@@ -80,7 +80,6 @@ services:
timeout: 10s
retries: 3
start_period: 10s
- restart: unless-stopped
volumes:
- 'clickhouse_data:/var/lib/clickhouse'
- type: bind
@@ -131,8 +130,4 @@ services:
0
-
-
-volumes:
- postgres_data:
- clickhouse_data:
+
\ No newline at end of file
From 9a7d3ab2962ae6aa706dc8b604cfe9a7782158fc Mon Sep 17 00:00:00 2001
From: zehjotkah <111518041+zehjotkah@users.noreply.github.com>
Date: Wed, 8 Oct 2025 10:34:11 +0100
Subject: [PATCH 3/3] replaced latest tag with specific version
---
templates/compose/rybbit.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/compose/rybbit.yaml b/templates/compose/rybbit.yaml
index 1b3ce16af..3c8f7564c 100644
--- a/templates/compose/rybbit.yaml
+++ b/templates/compose/rybbit.yaml
@@ -6,7 +6,7 @@
services:
rybbit:
- image: 'ghcr.io/rybbit-io/rybbit-client:latest'
+ image: 'ghcr.io/rybbit-io/rybbit-client:v1.6.1'
environment:
- SERVICE_URL_RYBBIT_3002
- NODE_ENV=production
@@ -22,7 +22,7 @@ services:
start_period: 10s
rybbit_backend:
- image: 'ghcr.io/rybbit-io/rybbit-backend:latest'
+ image: 'ghcr.io/rybbit-io/rybbit-backend:v1.6.1'
environment:
- NODE_ENV=production
- TRUST_PROXY=true