84 lines
1.2 KiB
Caddyfile
84 lines
1.2 KiB
Caddyfile
# Components
|
|
|
|
(private_network_only) {
|
|
@ipfilter {
|
|
not header X-Forwarded-For {$PRIVATE_NET_IP}
|
|
}
|
|
|
|
route @ipfilter {
|
|
respond "nty. :3" 418
|
|
}
|
|
}
|
|
|
|
(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) {
|
|
reverse_proxy host.containers.internal:{args[0]}
|
|
}
|
|
|
|
(application_base) {
|
|
import application_logging {args[0]}
|
|
import reverse_proxy_host {args[1]}
|
|
}
|
|
|
|
{
|
|
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
|
|
}
|
|
|
|
# Routes
|
|
|
|
:53100 {
|
|
import private_network_only
|
|
import application_base "grafana" 3100
|
|
}
|
|
|
|
:53000 {
|
|
import application_base "forgejo" 3000
|
|
}
|
|
|
|
:53001 {
|
|
import application_base "forgejo-pg-exporter" 3001
|
|
}
|
|
|
|
:55000 {
|
|
import private_network_only
|
|
import application_base "registry" 5000
|
|
}
|
|
|
|
:58082 {
|
|
import application_base "vault-web" 8082
|
|
}
|
|
|
|
:53010 {
|
|
import application_base "bookstack-web" 3010
|
|
}
|
|
|
|
:58112 {
|
|
import private_network_only
|
|
import application_base "deluge-web" 8112
|
|
}
|