-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f62ec79
commit 145912f
Showing
3 changed files
with
90 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,77 @@ | ||
{ | ||
{$CADDY_GLOBAL_OPTIONS} | ||
{$CADDY_GLOBAL_OPTIONS} | ||
|
||
frankenphp { | ||
{$FRANKENPHP_CONFIG} | ||
} | ||
frankenphp { | ||
{$FRANKENPHP_CONFIG} | ||
} | ||
|
||
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm | ||
order mercure after encode | ||
order vulcain after reverse_proxy | ||
order php_server before file_server | ||
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm | ||
order mercure after encode | ||
order vulcain after reverse_proxy | ||
order php_server before file_server | ||
} | ||
|
||
{$CADDY_EXTRA_CONFIG} | ||
|
||
{$SERVER_NAME:localhost} { | ||
log { | ||
# Redact the authorization query parameter that can be set by Mercure | ||
format filter { | ||
wrap console | ||
fields { | ||
uri query { | ||
replace authorization REDACTED | ||
} | ||
} | ||
} | ||
} | ||
log { | ||
# Redact the authorization query parameter that can be set by Mercure | ||
format filter { | ||
wrap console | ||
fields { | ||
uri query { | ||
replace authorization REDACTED | ||
} | ||
} | ||
} | ||
} | ||
|
||
root * /app/public | ||
encode zstd gzip | ||
root * /app/public | ||
encode zstd gzip | ||
|
||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Allow anonymous subscribers (double-check that it's what you want) | ||
anonymous | ||
# Enable the subscription API (double-check that it's what you want) | ||
subscriptions | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
mercure { | ||
# Transport to use (default to Bolt) | ||
transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
# Subscriber JWT key | ||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
# Allow anonymous subscribers (double-check that it's what you want) | ||
anonymous | ||
# Enable the subscription API (double-check that it's what you want) | ||
subscriptions | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
|
||
vulcain | ||
vulcain | ||
|
||
# Add links to the API docs and to the Mercure Hub if not set explicitly (e.g. the PWA) | ||
header ?Link `</docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation", </.well-known/mercure>; rel="mercure"` | ||
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics | ||
header ?Permissions-Policy "browsing-topics=()" | ||
# Add links to the API docs and to the Mercure Hub if not set explicitly (e.g. the PWA) | ||
header ?Link `</docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation", </.well-known/mercure>; rel="mercure"` | ||
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics | ||
header ?Permissions-Policy "browsing-topics=()" | ||
|
||
# Matches requests for OIDC routes | ||
@oidc expression path('/oidc/*') | ||
# Matches requests for OIDC routes | ||
@oidc expression path('/oidc/*') | ||
|
||
# Comment the following line if you don't want to manage Keycloak locally | ||
# In this case, you'll need an external OIDC server | ||
reverse_proxy @oidc http://{$OIDC_UPSTREAM} | ||
# Comment the following line if you don't want to manage Keycloak locally | ||
# In this case, you'll need an external OIDC server | ||
reverse_proxy @oidc http://{$OIDC_UPSTREAM} | ||
|
||
# Matches requests for HTML documents, for static files and for Next.js files, | ||
# except for known API paths and paths with extensions handled by API Platform | ||
@pwa expression `( | ||
header({'Accept': '*text/html*'}) | ||
&& !path( | ||
'/docs*', '/graphql*', '/bundles*', '/contexts*', '/_profiler*', '/_wdt*', | ||
'*.json*', '*.html', '*.csv', '*.yml', '*.yaml', '*.xml' | ||
) | ||
) | ||
|| path('/favicon.ico', '/manifest.json', '/robots.txt', '/_next*', '/sitemap*', '/api/auth/*')` | ||
# Matches requests for HTML documents, for static files and for Next.js files, | ||
# except for known API paths and paths with extensions handled by API Platform | ||
@pwa expression `( | ||
header({'Accept': '*text/html*'}) | ||
&& !path( | ||
'/docs*', '/graphql*', '/bundles*', '/contexts*', '/_profiler*', '/_wdt*', | ||
'*.json*', '*.html', '*.csv', '*.yml', '*.yaml', '*.xml' | ||
) | ||
) | ||
|| path('/favicon.ico', '/manifest.json', '/robots.txt', '/_next*', '/__nextjs*', '/sitemap*', '/api/auth/*')` | ||
|
||
# Comment the following line if you don't want Next.js to catch requests for HTML documents. | ||
# In this case, they will be handled by the PHP app. | ||
reverse_proxy @pwa http://{$PWA_UPSTREAM} | ||
# Comment the following line if you don't want Next.js to catch requests for HTML documents. | ||
# In this case, they will be handled by the PHP app. | ||
reverse_proxy @pwa http://{$PWA_UPSTREAM} | ||
|
||
php_server | ||
php_server | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
worker { | ||
file ./public/index.php | ||
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime | ||
file ./public/index.php | ||
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime | ||
} |