Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add Caddy+LetsEncrypt TLS example#4585

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bpmct merged 2 commits intomainfrombpmct/caddy-example
Oct 19, 2022
Merged

Conversation

bpmct
Copy link
Member

@bpmctbpmct commentedOct 17, 2022
edited
Loading

This is inspired byGitLab's Caddy Recipe and I plan to add additional ones for NGINX and Kubernetes ingress+cert-manager.

As much as possible, I tried to reference the Caddy docs for custom builds/providers, while showing one concrete example for wildcards: AWS Route53. If we want to make it slightly more concrete, I could actually modify the docker-compose to support building a custom Dockerfile there that the user could just uncomment.

I understand this adds some debt to the codebase, so I'm open to other ideas. I could just include code snippets in the docs but I found that structure a bit confusing. One advantage of having this in the codebase is I could create an automated (weekly) test to spin up a Coder server with Caddy and ensure everything works as planned. If we wanted to do that as a prerequisite to merging, I'd totally understand.

Contributes to#3518


## Generating wildcard certificates

By default, this configuration uses Caddy's [on-demand TLS](https://caddyserver.com/docs/caddyfile/options#on-demand-tls) to generate a certificate for each subdomain (e.g. `app1.coder.example.com`, `app2.coder.example.com`). When users visit new subdomains, such as accessing [ports on a workspace](../../networking/port-forwarding.md), the request will take an additional 5-30 seconds since a new certificate is being generated.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

the request will take an additional 5-30 seconds

I'm fairly certain this is the only downside of using Caddy's on-demand TLS. While LetsEncrypt's rate limit (50 certificates/domain/week) can quickly be exhausted, Caddy will silently fall back to ZeroSSL which has no rate limit. ZeroSSL is significantly slower though. If you think this needs further explanation in the docs, I can expand.

With that being said, the extra effort for a wildcard is worth it if a Coder deployment is being actively being used in production.

@bpmctbpmct requested review fromammario and removed request forkylecarbs andericpaulsenOctober 18, 2022 17:21
Copy link
Member

@ammarioammario left a comment

Choose a reason for hiding this comment

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

I have no experience with Caddy so can't give an approval here. Looks cool though.

@bpmctbpmct merged commit12cb4f1 intomainOct 19, 2022
@bpmctbpmct deleted the bpmct/caddy-example branchOctober 19, 2022 12:20
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 19, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ghuntleyghuntleyghuntley left review comments

@ammarioammarioammario left review comments

@sharkymarksharkymarksharkymark approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@bpmct@ghuntley@sharkymark@ammario

[8]ページ先頭

©2009-2025 Movatter.jp