mirror of
https://github.com/d0zingcat/ghost-docker.git
synced 2026-05-13 23:16:44 +00:00
TB: Move configuration to UI instead of env
- TB can now be toggled via the UI and setting it via env variables means the setting can never be toggled on/off properly - Doing it this way lets users control things more
This commit is contained in:
30
.env.example
30
.env.example
@@ -1,21 +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
|
||||
|
||||
# Database settings
|
||||
DATABASE_ROOT_PASSWORD=reallysecurerootpassword
|
||||
DATABASE_USER=optionalusername
|
||||
DATABASE_PASSWORD=ghostpassword
|
||||
|
||||
# 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_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
|
||||
|
||||
DATABASE_ROOT_PASSWORD=reallysecurerootpassword
|
||||
DATABASE_USER=optionalusername
|
||||
DATABASE_PASSWORD=ghostpassword
|
||||
|
||||
# Tinybird configuration for analytics
|
||||
TINYBIRD_API_URL=https://api.tinybird.co
|
||||
TINYBIRD_TRACKER_TOKEN=p.eyJxxxxx
|
||||
TINYBIRD_STATS_TOKEN=p.eyJxxxxx
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -33,9 +33,8 @@ 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__datasource: analytics_events
|
||||
tinybird__tracker__token: ${TINYBIRD_TRACKER_TOKEN:-}
|
||||
|
||||
Reference in New Issue
Block a user