mirror of
https://github.com/Dokploy/templates.git
synced 2026-03-11 17:48:11 -05:00
feat(blueprint): added rybbit template (#143)
* feat(blueprint): added rybbit template * feat: add rybbit entry to meta.json * docs: added rybbit self-hosting-advanced link as comment to docker-compose.yml * fix: remove default env args in docker-compose * chore: re-order rybbit_postgres env * fix: added missing clickhouse_user env * Update blueprints/rybbit/template.toml --------- Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
This commit is contained in:
112
blueprints/rybbit/docker-compose.yml
Normal file
112
blueprints/rybbit/docker-compose.yml
Normal file
@@ -0,0 +1,112 @@
|
||||
# https://www.rybbit.io/docs/self-hosting-advanced
|
||||
|
||||
services:
|
||||
rybbit_clickhouse:
|
||||
image: clickhouse/clickhouse-server:25.4.2
|
||||
volumes:
|
||||
- clickhouse_data:/var/lib/clickhouse
|
||||
- clickhouse_config:/etc/clickhouse-server/config.d
|
||||
environment:
|
||||
- CLICKHOUSE_DB=${CLICKHOUSE_DB}
|
||||
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
|
||||
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
|
||||
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
|
||||
networks:
|
||||
- internal
|
||||
|
||||
rybbit_postgres:
|
||||
image: postgres:17.4
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- internal
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
rybbit_backend:
|
||||
image: ghcr.io/rybbit-io/rybbit-backend:latest
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- CLICKHOUSE_HOST=http://rybbit_clickhouse:8123
|
||||
- CLICKHOUSE_DB=${CLICKHOUSE_DB}
|
||||
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
|
||||
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
|
||||
- POSTGRES_HOST=rybbit_postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
|
||||
- BASE_URL=${BASE_URL}
|
||||
- DISABLE_SIGNUP=${DISABLE_SIGNUP}
|
||||
depends_on:
|
||||
rybbit_clickhouse:
|
||||
condition: service_healthy
|
||||
rybbit_postgres:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- internal
|
||||
- web
|
||||
|
||||
rybbit_client:
|
||||
image: ghcr.io/rybbit-io/rybbit-client:latest
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_PUBLIC_BACKEND_URL=${BASE_URL}
|
||||
- NEXT_PUBLIC_DISABLE_SIGNUP=${DISABLE_SIGNUP}
|
||||
depends_on:
|
||||
- rybbit_backend
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- internal
|
||||
- web
|
||||
|
||||
rybbit_caddy:
|
||||
image: caddy:2-alpine
|
||||
networks:
|
||||
- web
|
||||
volumes:
|
||||
- ../files/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
environment:
|
||||
- BASE_URL=":80"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:80"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
clickhouse_data:
|
||||
clickhouse_config:
|
||||
postgres_data:
|
||||
|
||||
networks:
|
||||
web:
|
||||
driver: bridge
|
||||
internal:
|
||||
driver: bridge
|
||||
BIN
blueprints/rybbit/rybbit.png
Normal file
BIN
blueprints/rybbit/rybbit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 292 KiB |
41
blueprints/rybbit/template.toml
Normal file
41
blueprints/rybbit/template.toml
Normal file
@@ -0,0 +1,41 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
better_auth_secret = "${password:32}"
|
||||
clickhouse_password = "${password:32}"
|
||||
postgres_password = "${password:32}"
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "rybbit_caddy"
|
||||
port = 80
|
||||
host = "${main_domain}"
|
||||
|
||||
[config.env]
|
||||
BASE_URL = "http://${main_domain}"
|
||||
BETTER_AUTH_SECRET = "${better_auth_secret}"
|
||||
DISABLE_SIGNUP = "false"
|
||||
CLICKHOUSE_DB = "analytics"
|
||||
CLICKHOUSE_USER = "default"
|
||||
CLICKHOUSE_PASSWORD = "${clickhouse_password}"
|
||||
POSTGRES_DB = "analytics"
|
||||
POSTGRES_USER = "frog"
|
||||
POSTGRES_PASSWORD = "${postgres_password}"
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "./Caddyfile"
|
||||
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}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
13
meta.json
13
meta.json
@@ -2308,5 +2308,18 @@
|
||||
"database",
|
||||
"search"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "rybbit",
|
||||
"name": "Rybbit",
|
||||
"version": "latest",
|
||||
"description": "Open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive",
|
||||
"logo": "rybbit.png",
|
||||
"links": {
|
||||
"github": "https://github.com/rybbit-io/rybbit",
|
||||
"website": "https://rybbit.io",
|
||||
"docs": "https://www.rybbit.io/docs"
|
||||
},
|
||||
"tags": ["analytics"]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user