Skip to content

Commit

Permalink
feat: add caddy server extra
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias authored and dunglas committed Dec 4, 2023
1 parent c5dae59 commit f31a305
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ For instance, to use self-signed certificates created with [mkcert](https://gith
`mkdir frankenphp/certs -p`
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"`
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
php:
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:
+ - ./frankenphp/certs:/etc/caddy/certs:ro
Expand Down
2 changes: 2 additions & 0 deletions frankenphp/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

vulcain

{$CADDY_SERVER_EXTRA_DIRECTIVES}

# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
header ?Permissions-Policy "browsing-topics=()"

Expand Down

0 comments on commit f31a305

Please sign in to comment.