sesame/Caddyfile

81 lines
1.2 KiB
Caddyfile

# Components
(application_logging) {
log {
level INFO
output stdout
output file /var/log/caddy/caddy_{args[0]}.log {
roll_size 100MiB
roll_keep 5
roll_keep_for 100d
}
format json
}
}
(reverse_proxy_host) {
}
(application_base) {
import application_logging {args[0]}
reverse_proxy host.containers.internal:{args[1]}
}
(internal_base) {
import application_base {args[0]} {args[1]}
tls internal
}
{
log default {
output stdout
output file /var/log/caddy/caddy_main.log {
roll_size 100MiB
roll_keep 5
roll_keep_for 100d
}
format json
}
servers {
metrics
}
admin :2019
}
# Internal routes
#
# Local DNS is expected to set up and map
# these routes.
https://deluge.home.karnov.club {
import internal_base "deluge-web" 8112
}
https://panopticon.home.karnov.club {
import internal_base "grafana" 3100
}
https://cr.home.karnov.club {
import internal_base "registry" 5000
}
# External routes
#
# Port-based routes face the outside world.
:53000 {
import application_base "forgejo" 3000
}
:53001 {
import application_base "forgejo-pg-exporter" 3001
}
:58082 {
import application_base "vault-web" 8082
}
:53010 {
import application_base "bookstack-web" 3010
}