mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 00:05:19 -07:00
17 lines
547 B
Caddyfile
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}
|