Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(readme): add exemplary configuration for Caddy v2 #213

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ location /whiteboard/ {
}
```

#### Caddy v2

```
handle_path /whiteboard/* {
reverse_proxy http://127.0.0.1:3002
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AIO seems to also strip the path from the URI passed along. Should both work as of right now, but might be safer that way:

https://github.com/nextcloud/all-in-one/blob/9130cff8041bcb96b49ec67a50cbc6403f22e235/Containers/apache/Caddyfile#L55-L58

Copy link
Member Author

@st3iny st3iny Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is semantically the same. But we can have it more explicit if you prefer. The handle_path directive implicitly strips the prefix and I tested the configuration locally.

Works the same as the handle directive, but implicitly uses uri strip_prefix to strip the matched path prefix.

Ref https://caddyserver.com/docs/caddyfile/directives/handle_path#examples

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice

}
```

## Storage Strategies and Scaling

The whiteboard application supports two storage strategies: LRU (Least Recently Used) cache and Redis. Each strategy has its own characteristics and is suitable for different deployment scenarios.
Expand Down