chore: add rybbit

This commit is contained in:
LRVT
2026-03-22 23:39:26 +01:00
parent ecedb07cfc
commit a873f5d7a7
3 changed files with 174 additions and 0 deletions

View File

@@ -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. - [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. - [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 ### Security & Privacy

View File

@@ -0,0 +1,3 @@
# References
- https://rybbit.com/docs/self-hosting

View File

@@ -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: |
<clickhouse>
<listen_host>0.0.0.0</listen_host>
</clickhouse>
clickhouse_json:
content: |
<clickhouse>
<settings>
<enable_json_type>1</enable_json_type>
</settings>
</clickhouse>
clickhouse_logging:
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>
clickhouse_user_logging:
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>
#networks:
# proxy:
# external: true
# internal:
# internal: true