feat: add caddy server extra

This commit is contained in:
Maxime Hélias 2023-12-03 21:08:17 +01:00 committed by Kévin Dunglas
parent c5dae592bd
commit f31a305385
2 changed files with 4 additions and 2 deletions

View File

@ -26,11 +26,11 @@ For instance, to use self-signed certificates created with [mkcert](https://gith
`mkdir frankenphp/certs -p` `mkdir frankenphp/certs -p`
3. Generate the certificates for your local host (example: "server-name.localhost"): 3. Generate the certificates for your local host (example: "server-name.localhost"):
`mkcert -cert-file frankenphp/certs/tls.pem -key-file frankenphp/certs/tls.key "server-name.localhost"` `mkcert -cert-file frankenphp/certs/tls.pem -key-file frankenphp/certs/tls.key "server-name.localhost"`
4. Add these lines to the `./compose.override.yaml` file about `CADDY_EXTRA_CONFIG` environment and volume for the `php` service : 4. Add these lines to the `./compose.override.yaml` file about `CADDY_SERVER_EXTRA_DIRECTIVES` environment and volume for the `php` service :
```diff ```diff
php: php:
environment: environment:
+ CADDY_EXTRA_CONFIG: "tls /etc/caddy/certs/tls.pem /etc/caddy/certs/tls.key" + CADDY_SERVER_EXTRA_DIRECTIVES: "tls /etc/caddy/certs/tls.pem /etc/caddy/certs/tls.key"
# ... # ...
volumes: volumes:
+ - ./frankenphp/certs:/etc/caddy/certs:ro + - ./frankenphp/certs:/etc/caddy/certs:ro

View File

@ -46,6 +46,8 @@
vulcain vulcain
{$CADDY_SERVER_EXTRA_DIRECTIVES}
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics # Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
header ?Permissions-Policy "browsing-topics=()" header ?Permissions-Policy "browsing-topics=()"