41 lines
No EOL
1,021 B
Caddyfile
41 lines
No EOL
1,021 B
Caddyfile
# Global options
|
|
{
|
|
acme_dns porkbun {
|
|
api_key {env.PORKBUN_API_KEY}
|
|
api_secret_key {env.PORKBUN_API_SECRET_KEY}
|
|
}
|
|
email ty@myriation.xyz
|
|
|
|
storage file_system {
|
|
root /var/lib/caddy
|
|
}
|
|
}
|
|
|
|
# Handle all routes handled by this server
|
|
https://*.m.myriation.xyz {
|
|
# Enforce always using HTTPS
|
|
header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
# Give an HTTP cat on any errors
|
|
handle_errors {
|
|
header Content-Type text/html
|
|
respond "<!DOCTYPE html><html><head><title>Error :(</title></head><body><img src=\"https://http.cat/{http.error.status_code}\" alt=\"cat\"></body></html>" {http.error.status_code}
|
|
}
|
|
|
|
# Configure all service matchers
|
|
@jellyfin host jellyfin.m.myriation.xyz
|
|
@jellyseerr host jellyseerr.m.myriation.xyz
|
|
|
|
# Handle all services
|
|
handle @jellyfin {
|
|
reverse_proxy jellyfin.containers:8096
|
|
}
|
|
|
|
handle @jellyseerr {
|
|
reverse_proxy jellyseerr.containers:5055
|
|
}
|
|
|
|
# Handle all unmatched requests as a 404
|
|
handle {
|
|
error "Not Found" 404
|
|
}
|
|
} |