fix(blueprint): rybbit v1.2.0 (#160)

* fix(blueprint): rybbit v1.0, no more /api stripping

Release notes:
- https://github.com/rybbit-io/rybbit/releases/tag/v1.0.0

Migration guide:
- https://www.rybbit.io/docs/v1-migration

* fix(blueprint): rybbit /health -> /api/health in v1.0.0

* docs(blueprint): notes on rybbit domain

* fix(blueprint): use version tag 1.0.0 in docker compose

* fix(blueprint): bump clickhouse and postgres versions for rybbit

* fix(blueprint): remote clickhouse config.d volume

* fix(blueprint): remove network configurations

* docs(blueprint): rybbit CORS typo

* docs(blueprint): rybbit only supports HTTPS

* feat(blueprint): rybbit clickhouse config mounted, bump versions

* chore(blueprint): bump rybbit version in meta.json

* deps: bump rybbit to v1.2.0
This commit is contained in:
Khiet Tam Nguyen
2025-06-20 14:23:44 +10:00
committed by GitHub
parent fe4fdd45f7
commit f55f521dd2
3 changed files with 73 additions and 65 deletions

View File

@@ -1,11 +1,20 @@
# https://www.rybbit.io/docs/self-hosting-advanced
# NOTE: there are two sample HTTP traefik domain entries created:
# - rybbit_backend (port 3001, path /api),
# - rybbit_client (port 3002, path /)
#
# You should treat these as placeholders - Rybbit only supports HTTPS.
#
# You should also update the `BASE_URL` environment variable when
# updating the domain entries with your custom domain.
services:
rybbit_clickhouse:
image: clickhouse/clickhouse-server:25.4.2
image: clickhouse/clickhouse-server:25.5
volumes:
- clickhouse_data:/var/lib/clickhouse
- clickhouse_config:/etc/clickhouse-server/config.d
- ../files/clickhouse_config:/etc/clickhouse-server/config.d
environment:
- CLICKHOUSE_DB=${CLICKHOUSE_DB}
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
@@ -25,11 +34,9 @@ services:
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- internal
rybbit_postgres:
image: postgres:17.4
image: postgres:17.5
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
@@ -42,11 +49,9 @@ services:
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- internal
rybbit_backend:
image: ghcr.io/rybbit-io/rybbit-backend:latest
image: ghcr.io/rybbit-io/rybbit-backend:v1.2.0
environment:
- NODE_ENV=production
- CLICKHOUSE_HOST=http://rybbit_clickhouse:8123
@@ -67,18 +72,15 @@ services:
rybbit_postgres:
condition: service_started
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3001/health"]
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
networks:
- internal
- web
rybbit_client:
image: ghcr.io/rybbit-io/rybbit-client:latest
image: ghcr.io/rybbit-io/rybbit-client:v1.2.0
environment:
- NODE_ENV=production
- NEXT_PUBLIC_BACKEND_URL=${BASE_URL}
@@ -86,40 +88,7 @@ services:
depends_on:
- rybbit_backend
restart: unless-stopped
networks:
- internal
- web
rybbit_caddy:
image: caddy:2-alpine
volumes:
- ../files/Caddyfile:/etc/caddy/Caddyfile:ro
environment:
- BASE_URL=":80"
healthcheck:
test:
[
"CMD",
"wget",
"--spider",
"--no-verbose",
"http://127.0.0.1:2019/metrics",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- web
volumes:
clickhouse_data:
clickhouse_config:
postgres_data:
networks:
web:
driver: bridge
internal:
driver: bridge

View File

@@ -5,8 +5,14 @@ clickhouse_password = "${password:32}"
postgres_password = "${password:32}"
[[config.domains]]
serviceName = "rybbit_caddy"
port = 80
serviceName = "rybbit_backend"
port = 3001
host = "${main_domain}"
path = "/api"
[[config.domains]]
serviceName = "rybbit_client"
port = 3002
host = "${main_domain}"
[config.env]
@@ -21,21 +27,54 @@ POSTGRES_USER = "frog"
POSTGRES_PASSWORD = "${postgres_password}"
[[config.mounts]]
filePath = "./Caddyfile"
filePath = "./clickhouse_config/enable_json.xml"
content = """
{$BASE_URL} {
route {
@api path /api/*
uri @api strip_prefix /api
reverse_proxy @api http://rybbit_backend:3001 {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Real-IP {http.request.header.X-Real-IP}
}
reverse_proxy http://rybbit_client:3002 {
header_up Host {http.reverse_proxy.upstream.hostport}
header_up X-Real-IP {http.request.header.X-Real-IP}
}
}
}
<clickhouse>
<settings>
<enable_json_type>1</enable_json_type>
</settings>
</clickhouse>
"""
[[config.mounts]]
filePath = "./clickhouse_config/logging_rules.xml"
content = """
<clickhouse>
<logger>
<level>warning</level>
<console>true</console>
</logger>
<query_thread_log remove="remove"/>
<query_log remove="remove"/>
<text_log remove="remove"/>
<trace_log remove="remove"/>
<metric_log remove="remove"/>
<asynchronous_metric_log remove="remove"/>
<session_log remove="remove"/>
<part_log remove="remove"/>
<latency_log remove="remove"/>
<processors_profile_log remove="remove"/>
</clickhouse>
"""
[[config.mounts]]
filePath = "./clickhouse_config/network.xml"
content = """
<clickhouse>
<listen_host>0.0.0.0</listen_host>
</clickhouse>
"""
[[config.mounts]]
filePath = "./clickhouse_config/user_logging.xml"
content = """
<clickhouse>
<profiles>
<default>
<log_queries>0</log_queries>
<log_query_threads>0</log_query_threads>
<log_processors_profiles>0</log_processors_profiles>
</default>
</profiles>
</clickhouse>
"""

View File

@@ -2413,7 +2413,7 @@
{
"id": "rybbit",
"name": "Rybbit",
"version": "latest",
"version": "v1.2.0",
"description": "Open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive",
"logo": "rybbit.png",
"links": {