Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
# Use the below flags to enable the Analytics or ActivityPub containers as well
# Note: You must set ENABLE_DEVELOPER_EXPERIMENTS to `true` when enabling either profile below
# COMPOSE_PROFILES=analytics,activitypub

# Which Ghost version to run
GHOST_VERSION=5-alpine

# Public domain Ghost is going to run on
DOMAIN=example.com

# Location to store uploaded data
UPLOAD_LOCATION=./data/ghost

# Location for database data
MYSQL_DATA_LOCATION=./data/mysql

# Database settings
DATABASE_ROOT_PASSWORD=reallysecurerootpassword
DATABASE_USER=optionalusername
DATABASE_PASSWORD=ghostpassword

# Tinybird configuration for analytics
# Developer Experiences must be enabled for
# both Traffic Analytics and ActivityPub
ENABLE_DEVELOPER_EXPERIMENTS=false

# Developer Experiments must be enabled above
ENABLE_ACTIVITYPUB=false

# Tinybird configuration
TINYBIRD_API_URL=https://api.tinybird.co
TINYBIRD_ID=745d3247-e887-4873-84f7-7414ec758b83
TINYBIRD_TRACKER_TOKEN=p.eyJxxxxx
TINYBIRD_STATS_TOKEN=p.eyJxxxxx

# Data locations
# Location to store uploaded data
UPLOAD_LOCATION=./data/ghost

# Location for database data
MYSQL_DATA_LOCATION=./data/mysql
3 changes: 2 additions & 1 deletion TINYBIRD.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ Steps:
1. Using the UI link from the previous step, open your workspace and click on *Tokens* in the left hand menu
1. Copy your Tinybird `stats_page` token and add it to your `.env` file as `TINYBIRD_STATS_TOKEN`
1. Copy your Tinybird `tracker` token and add it to your `.env` file as `TINYBIRD_TRACKER_TOKEN`
1. Run `docker compose --profile=analytics up -d` to start all services in the background. You can also set `COMPOSE_PROFILES=analytics` in your `.env` file to automatically include the `analytics` profile when running `docker compose` commands.
1. Run `docker compose --profile=analytics up -d` to start all services in the background
1. Set `COMPOSE_PROFILES=analytics` in your `.env` file to automatically include the `analytics` profile when running `docker compose` commands
1. At this point, everything should be working. You can test it's working by visiting your site's homepage, then checking the Stats page in Ghost Admin — you should see a view recorded.
7 changes: 2 additions & 5 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@ services:
database__connection__user: ${DATABASE_USER:-ghost}
database__connection__password: ${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}
database__connection__database: ghost
enableDeveloperExperiments: true
labs__trafficAnalytics: true
labs__ActivityPub: true
enableDeveloperExperiments: ${ENABLE_DEVELOPER_EXPERIMENTS:-false}
labs__ActivityPub: ${ENABLE_ACTIVITYPUB:-false}
tinybird__tracker__endpoint: https://${DOMAIN:?DOMAIN environment variable is required}/.ghost/analytics/tb/web_analytics
tinybird__tracker__id: ${TINYBIRD_ID:-}
tinybird__tracker__datasource: analytics_events
tinybird__tracker__token: ${TINYBIRD_TRACKER_TOKEN:-}
tinybird__stats__endpoint: ${TINYBIRD_API_URL:-https://api.tinybird.co}
tinybird__stats__id: ${TINYBIRD_ID:-}
tinybird__stats__token: ${TINYBIRD_STATS_TOKEN:-}
volumes:
- ${UPLOAD_LOCATION:-./data/ghost}:/var/lib/ghost/content
Expand Down