From 2a65c4ec66b0b715a59992c58aae94365b511253 Mon Sep 17 00:00:00 2001 From: Joe Grigg Date: Tue, 3 Jun 2025 10:25:07 +0100 Subject: [PATCH] Started routing activitypub requests to activitypub container --- Caddyfile | 7 +++++++ compose.yml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Caddyfile b/Caddyfile index 7bb50bd..8f9aa90 100644 --- a/Caddyfile +++ b/Caddyfile @@ -13,6 +13,13 @@ rewrite * {re.analytics_match.2} reverse_proxy traffic-analytics:3000 } + + # Proxy activitypub requests with any prefix (e.g. /.ghost/activitypub/ or /blog/.ghost/activitypub/) + @activitypub_paths path_regexp activitypub_match ^(.*)/\.ghost/activitypub(.*)$ + handle @activitypub_paths { + rewrite * {re.activitypub_match.2} + reverse_proxy traffic-analytics:8080 + } # Default proxy to Ghost handle { diff --git a/compose.yml b/compose.yml index 5556362..75b048b 100644 --- a/compose.yml +++ b/compose.yml @@ -55,8 +55,8 @@ services: db: image: mysql:8.0 restart: always - ports: - - "3306:3306" + expose: + - "3306" environment: MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD:?DATABASE_ROOT_PASSWORD environment variable is required} MYSQL_USER: ${DATABASE_USER:-ghost}