From dc63fab87943eda706040d86c14ba3aee8138f9e Mon Sep 17 00:00:00 2001 From: Joe Grigg Date: Mon, 2 Jun 2025 14:12:19 +0100 Subject: [PATCH] Added activitypub configuration --- .env.example | 5 ++++- compose.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index a212343..6115d3e 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,5 @@ +# COMPOSE_PROFILES=analytics,activitypub + DOMAIN=example.com DATABASE_ROOT_PASSWORD=reallysecurerootpassword @@ -10,4 +12,5 @@ TINYBIRD_ID=745d3247-e887-4873-84f7-7414ec758b83 TINYBIRD_TRACKER_TOKEN=p.eyJxxxxx TINYBIRD_STATS_TOKEN=p.eyJxxxxx -# COMPOSE_PROFILES=analytics,activitypub +# Activity Pub Configuration +ACTIVITYPUB_GCP_BUCKET=bucket-name diff --git a/compose.yml b/compose.yml index 2bfbfa1..316d23b 100644 --- a/compose.yml +++ b/compose.yml @@ -84,6 +84,28 @@ services: networks: - ghost_network + activitypub: + image: ghcr.io/tryghost/activitypub:edge + restart: always + expose: + - "8080" + - "9229" + environment: + NODE_ENV: production + PORT: 8080 + MYSQL_HOST: db + MYSQL_USER: ${DATABASE_USER:-ghost} + MYSQL_PASSWORD: ${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required} + MYSQL_DATABASE: activitypub + USE_MQ: false + GCP_BUCKET_NAME: ${ACTIVITYPUB_GCP_BUCKET:?ACTIVITYPUB_GCP_BUCKET environment variable is required} + depends_on: + - db + networks: + - ghost_network + + # Suporting Services + tinybird-sync: image: ghost:5-alpine command: > @@ -123,6 +145,18 @@ services: - ghost_network tty: true + activitypub-migrate: + image: ghcr.io/tryghost/activitypub-migrations:edge + environment: + MYSQL_DB: mysql://${DATABASE_USER:-ghost}:${DATABASE_PASSWORD:?DATABASE_PASSWORD environment variable is required}@tcp(db:3306)/activitypub + networks: + - ghost_network + depends_on: + db: + condition: service_healthy + profiles: [activitypub] + restart: no + volumes: ghost_content: db_data: