add caddy configuration
This commit is contained in:
37
caddy/Caddyfile
Normal file
37
caddy/Caddyfile
Normal file
@@ -0,0 +1,37 @@
|
||||
rik.veenboer.xyz \
|
||||
*.rik.veenboer.xyz \
|
||||
{
|
||||
reverse_proxy nginx
|
||||
tls {
|
||||
dns route53 {
|
||||
access_key_id {$AWS_ACCESS_KEY_ID}
|
||||
secret_access_key {$AWS_SECRET_ACCESS_KEY}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
authentik.rik.veenboer.xyz {
|
||||
route {
|
||||
reverse_proxy host:19000
|
||||
}
|
||||
}
|
||||
|
||||
(authentik) {
|
||||
reverse_proxy /outpost.goauthentik.io/* http://host:19000
|
||||
forward_auth http://host:19000 {
|
||||
uri /outpost.goauthentik.io/auth/caddy?rd={http.request.uri}
|
||||
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
|
||||
}
|
||||
}
|
||||
|
||||
(proxy) {
|
||||
{args[0]}.rik.veenboer.xyz {
|
||||
route {
|
||||
import authentik
|
||||
reverse_proxy {args[1]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import proxy app host:12345
|
||||
import proxy daggos host:3000
|
||||
8
caddy/Dockerfile
Normal file
8
caddy/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM caddy:2.7-builder AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/route53
|
||||
|
||||
FROM caddy:2.7-alpine
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
Reference in New Issue
Block a user