Skip to content

Commit 215794e

Browse files
cmraiblejloh
authored andcommitted
Updated Ghost config and Tinybird instructions to replace stats token with JWTs
1 parent 6e5400a commit 215794e

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ENABLE_ACTIVITYPUB=false
2828
# Tinybird configuration
2929
TINYBIRD_API_URL=https://api.tinybird.co
3030
TINYBIRD_TRACKER_TOKEN=p.eyJxxxxx
31-
TINYBIRD_STATS_TOKEN=p.eyJxxxxx
31+
TINYBIRD_ADMIN_TOKEN=p.eyJxxxxx
3232

3333
# Data locations
3434
# Location to store uploaded data

TINYBIRD.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ Steps:
77
1. Run `docker compose run --rm tinybird-login` to login to your Tinybird account
88
1. Run `docker compose --profile=analytics up tinybird-sync`. This will copy the Tinybird files from the Ghost container into a shared volume. The service should log "Tinybird files synced into shared volume.", then exit.
99
1. Run `docker compose --profile=analytics up tinybird-deploy` and wait for the service to exit successfully. This will create your Tinybird datasources, pipes and API endpoints. It may take a minute or two to complete the first time. You should see "Deployment #1 is live!" in your terminal before the service exits.
10-
1. Find your workspace's events API endpoint: `docker compose run --rm tinybird-login tb --cloud info`, copy the value of "api", and add it to your `.env` file as `TINYBIRD_API_URL`. You can also find this value in your Tinybird Workspace's UI.
10+
1. Find your workspace's ID and events API endpoint: `docker compose run --rm tinybird-login tb --cloud info`
11+
- Copy the value of "api", and add it to your `.env` file as `TINYBIRD_API_URL`. You can also find this value in your Tinybird Workspace's UI.
12+
- Copy the value of "workspace_id", and add it to your `.env` file as `TINYBIRD_WORKSPACE_ID`
1113
1. Using the UI link from the previous step, open your workspace and click on *Tokens* in the left hand menu
12-
1. Copy your Tinybird `stats_page` token and add it to your `.env` file as `TINYBIRD_STATS_TOKEN`
14+
1. Copy your Tinybird "Workspace admin token" and add it to your `.env` file as `TINYBIRD_ADMIN_TOKEN`
1315
1. Copy your Tinybird `tracker` token and add it to your `.env` file as `TINYBIRD_TRACKER_TOKEN`
1416
1. Run `docker compose --profile=analytics up -d` to start all services in the background
1517
1. Set `COMPOSE_PROFILES=analytics` in your `.env` file to automatically include the `analytics` profile when running `docker compose` commands

compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ services:
3838
enableDeveloperExperiments: ${ENABLE_DEVELOPER_EXPERIMENTS:-false}
3939
labs__ActivityPub: ${ENABLE_ACTIVITYPUB:-false}
4040
tinybird__tracker__endpoint: https://${DOMAIN:?DOMAIN environment variable is required}/.ghost/analytics/api/v1/page_hit
41+
tinybird__adminToken: ${TINYBIRD_ADMIN_TOKEN:-}
42+
tinybird__workspaceId: ${TINYBIRD_WORKSPACE_ID:-}
4143
tinybird__tracker__datasource: analytics_events
4244
tinybird__stats__endpoint: ${TINYBIRD_API_URL:-https://api.tinybird.co}
43-
tinybird__stats__token: ${TINYBIRD_STATS_TOKEN:-}
4445
volumes:
4546
- ${UPLOAD_LOCATION:-./data/ghost}:/var/lib/ghost/content
4647
depends_on:

0 commit comments

Comments
 (0)