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}