🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
update docs (#625)
Bill Yang3f63cd6a2ae5
diff --git a/docs-v2/content/docs/meta.json b/docs-v2/content/docs/meta.jsonindex 3b4880cb5..0af5bb1cd 100644--- a/docs-v2/content/docs/meta.json+++ b/docs-v2/content/docs/meta.json@@ -15,8 +15,6 @@"---Self-hosting---","self-hosting","troubleshooting",- "self-hosting-manual",- "self-hosting-advanced","self-hosting-guides","v1-migration","---Settings---",diff --git a/docs-v2/content/docs/self-hosting-guides/custom-nginx.mdx b/docs-v2/content/docs/self-hosting-guides/custom-nginx.mdxindex 13c16dd13..d9cf966a4 100644--- a/docs-v2/content/docs/self-hosting-guides/custom-nginx.mdx+++ b/docs-v2/content/docs/self-hosting-guides/custom-nginx.mdx@@ -28,6 +28,12 @@ First, set up Rybbit to expose ports without the built-in webserver:./setup.sh your.domain.name --no-webserver```+Optionally, include a Mapbox token for globe visualizations:++```bash+./setup.sh your.domain.name --no-webserver --mapbox-token YOUR_MAPBOX_TOKEN+```+This will expose:- Backend service on port 3001- Client service on port 3002@@ -184,6 +190,9 @@ If you need to use custom ports for Rybbit:```bash./setup.sh your.domain.name --no-webserver --backend-port 8080 --client-port 8081++# With Mapbox token+./setup.sh your.domain.name --no-webserver --backend-port 8080 --client-port 8081 --mapbox-token YOUR_MAPBOX_TOKEN```Update your Nginx configuration accordingly:diff --git a/docs-v2/content/docs/self-hosting-guides/meta.json b/docs-v2/content/docs/self-hosting-guides/meta.jsonindex 5058eaf88..4060bc33f 100644--- a/docs-v2/content/docs/self-hosting-guides/meta.json+++ b/docs-v2/content/docs/self-hosting-guides/meta.json@@ -1,7 +1,4 @@{"title": "Self-Hosting Guides",- "pages": [- "custom-nginx",- "nginx-proxy-manager"- ]-}\ No newline at end of file+ "pages": ["custom-nginx", "nginx-proxy-manager", "self-hosting-advanced", "self-hosting-manual"]+}diff --git a/docs-v2/content/docs/self-hosting-guides/nginx-proxy-manager.mdx b/docs-v2/content/docs/self-hosting-guides/nginx-proxy-manager.mdxindex 3bffec7d2..aadfeeee9 100644--- a/docs-v2/content/docs/self-hosting-guides/nginx-proxy-manager.mdx+++ b/docs-v2/content/docs/self-hosting-guides/nginx-proxy-manager.mdx@@ -84,6 +84,7 @@ services:- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}- BASE_URL=${BASE_URL}- DISABLE_SIGNUP=${DISABLE_SIGNUP}+ - MAPBOX_TOKEN=${MAPBOX_TOKEN}depends_on:rybbit_clickhouse:condition: service_healthy@@ -142,6 +143,9 @@ BETTER_AUTH_SECRET=your_generated_secret_here# Optional: Disable new user signups after creating admin accountDISABLE_SIGNUP=false+# Optional but recommended: Mapbox token for globe visualizations+MAPBOX_TOKEN=your_mapbox_token+# Optional: Custom image tagIMAGE_TAG=latest```diff --git a/docs-v2/content/docs/self-hosting-advanced.mdx b/docs-v2/content/docs/self-hosting-guides/self-hosting-advanced.mdxsimilarity index 89%rename from docs-v2/content/docs/self-hosting-advanced.mdxrename to docs-v2/content/docs/self-hosting-guides/self-hosting-advanced.mdxindex 559df9587..aa258ea1c 100644--- a/docs-v2/content/docs/self-hosting-advanced.mdx+++ b/docs-v2/content/docs/self-hosting-guides/self-hosting-advanced.mdx@@ -20,10 +20,14 @@ Available options:- `--no-webserver`: Disable the built-in Caddy webserver- `--backend-port <port>`: Set custom host port for backend (default: 3001)- `--client-port <port>`: Set custom host port for client (default: 3002)+- `--mapbox-token <token>`: Set Mapbox API token (optional but recommended for globe visualizations)- `--help`: Show help messageExamples:```bash+# With Mapbox token+./setup.sh tracking.example.com --mapbox-token YOUR_MAPBOX_TOKEN+# Custom ports with built-in webserver./setup.sh tracking.example.com --backend-port 8080 --client-port 8081@@ -66,6 +70,9 @@ DISABLE_SIGNUP=falseOptional variables that can be added:```bash+# Mapbox token for 3D map visualizations+MAPBOX_TOKEN=your_mapbox_token+# Database configuration (uses defaults if not specified)CLICKHOUSE_PASSWORD=frogPOSTGRES_USER=frogdiff --git a/docs-v2/content/docs/self-hosting-manual.mdx b/docs-v2/content/docs/self-hosting-guides/self-hosting-manual.mdxsimilarity index 98%rename from docs-v2/content/docs/self-hosting-manual.mdxrename to docs-v2/content/docs/self-hosting-guides/self-hosting-manual.mdxindex 120eb48e2..25174f102 100644--- a/docs-v2/content/docs/self-hosting-manual.mdx+++ b/docs-v2/content/docs/self-hosting-guides/self-hosting-manual.mdx@@ -44,6 +44,9 @@ BETTER_AUTH_SECRET=your-very-long-random-secret-string-here# Optional: Disable new user signups after creating admin accountDISABLE_SIGNUP=false+# Optional but recommended: Mapbox token for globe visualizations+MAPBOX_TOKEN=your_mapbox_token+# Optional: Custom ports (only needed if you want different ports)# HOST_BACKEND_PORT="3001:3001"# HOST_CLIENT_PORT="3002:3002"@@ -317,6 +320,7 @@ services:- DOMAIN_NAME=${DOMAIN_NAME}- DISABLE_SIGNUP=${DISABLE_SIGNUP}- DISABLE_TELEMETRY=${DISABLE_TELEMETRY}+ - MAPBOX_TOKEN=${MAPBOX_TOKEN}depends_on:clickhouse:condition: service_healthydiff --git a/docs-v2/content/docs/self-hosting.mdx b/docs-v2/content/docs/self-hosting.mdxindex d3cbfb785..71dd119fc 100644--- a/docs-v2/content/docs/self-hosting.mdx+++ b/docs-v2/content/docs/self-hosting.mdx@@ -80,16 +80,24 @@ The repository includes a setup script that configures the necessary environment</Callout>Run the setup script, replacing `your.domain.name` with the domain or subdomain you configured in the prerequisites:+```bash./setup.sh your.domain.name```+If you want to enable 3D map visualizations, you can add the `--mapbox-token` flag:++```bash+./setup.sh your.domain.name --mapbox-token YOUR_MAPBOX_TOKEN+```++The script will create a `.env` file and then build and start the containers. This might take a few minutes the first time.<Callout type="info">By default, we assume you are on a blank VPS and automatically setup a Caddy webserver. If you want to use your own webserver or need more control over the setup, check out:- - [Manual Docker Compose Setup](/docs/self-hosting-manual) - For users with existing reverse proxies or deployment tools- - [Advanced Self-Hosting Guide](/docs/self-hosting-advanced) - For custom configurations and Nginx setup+ - [Manual Docker Compose Setup](/docs/self-hosting-guides/self-hosting-manual) - For users with existing reverse proxies or deployment tools+ - [Advanced Self-Hosting Guide](/docs/self-hosting-guides/self-hosting-advanced) - For custom configurations and Nginx setup</Callout></Step>diff --git a/setup.sh b/setup.shindex c81224373..00b429570 100644--- a/setup.sh+++ b/setup.sh@@ -7,6 +7,7 @@ set -eUSE_WEBSERVER="true"BACKEND_PORT="3001"CLIENT_PORT="3002"+MAPBOX_TOKEN=""# Help functionshow_help() {@@ -18,6 +19,7 @@ show_help() {echo " --no-webserver Disable the built-in Caddy webserver"echo " --backend-port <port> Set custom host port for backend (default: 3001)"echo " --client-port <port> Set custom host port for client (default: 3002)"+ echo " --mapbox-token <token> Set Mapbox API token (optional but recommended for maps)"echo " --help Show this help message"}@@ -46,6 +48,15 @@ while [[ "$#" -gt 0 ]]; doCLIENT_PORT="$2"shift 2;;+ --mapbox-token)+ if [[ -z "$2" || "$2" =~ ^- ]]; then+ echo "Error: --mapbox-token requires a token value"+ show_help+ exit 1+ fi+ MAPBOX_TOKEN="$2"+ shift 2+ ;;--help)show_helpexit 0@@ -100,6 +111,11 @@ BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}DISABLE_SIGNUP=falseEOL+# Add MAPBOX_TOKEN if provided+if [ -n "$MAPBOX_TOKEN" ]; then+ echo "MAPBOX_TOKEN=${MAPBOX_TOKEN}" >> .env+fi+# Only add port variables if using custom ports or no webserverif [ "$USE_WEBSERVER" = "false" ]; then# When not using the built-in webserver, expose ports to all interfaces