Files
deploy-sourcegraph-docker/caddy/builtins/https.custom-cert.Caddyfile
T

17 lines
547 B
Caddyfile

# Serves Sourcegraph over HTTPS, using a custom SSL certificate/key pair
# that's bind mounted from the host to /sourcegraph.pem and /sourcegraph.key.
#
# Caddyfile documentation: https://caddyserver.com/docs/caddyfile
{$SRC_SITE_ADDRESS}
# Redirects all HTTP traffic to HTTPS (using custom SSL certificates disables the automatic HTTPS feature of Caddy, see https://caddyserver.com/docs/automatic-https)
@http {
protocol http
}
redir @http https://{host}{uri}
tls /sourcegraph.pem /sourcegraph.key
reverse_proxy {$SRC_FRONTEND_ADDRESSES}