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..3c8f7564c --- /dev/null +++ b/templates/compose/rybbit.yaml @@ -0,0 +1,133 @@ +# 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: 3002 + +services: + rybbit: + image: 'ghcr.io/rybbit-io/rybbit-client:v1.6.1' + 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 + 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:v1.6.1' + 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=${CLICKHOUSE_USER:-default}' + - 'CLICKHOUSE_DB=${CLICKHOUSE_DB:-analytics}' + - POSTGRES_HOST=rybbit_postgres + - POSTGRES_PORT=5432 + - 'POSTGRES_DB=${POSTGRES_DB:-analytics}' + - 'POSTGRES_USER=${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 + + rybbit_postgres: + image: 'postgres:17.4' + environment: + - 'POSTGRES_DB=${POSTGRES_DB:-analytics}' + - 'POSTGRES_USER=${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 + + rybbit_clickhouse: + image: 'clickhouse/clickhouse-server:25.4.2' + environment: + - '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"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s + 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 + + + \ No newline at end of file