improve caddy

This commit is contained in:
Florian Zirker 2024-12-11 15:35:57 +01:00
parent 0c4eed7709
commit bce4a0ba8f
3 changed files with 39 additions and 21 deletions

View file

@ -22,3 +22,12 @@ end_of_line = lf
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
tab_width = 4 tab_width = 4
[Caddyfile]
indent_style = tab
indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

View file

@ -1,44 +1,51 @@
{ {
auto_https off auto_https off
log default {
output stdout
format console
}
} }
http://whoami.lan { http://whoami.{$DOMAIN} {
reverse_proxy whoami:80 reverse_proxy whoami:80
} }
http://dashboard.lan { http://dashboard.{$DOMAIN} {
reverse_proxy homer:8080 reverse_proxy homer:8080
} }
http://hassi.lan { http://hassi.{$DOMAIN} {
# reverse_proxy homeassistant:8123 # reverse_proxy homeassistant:8123
reverse_proxy dockerhost-1.lan:8123 reverse_proxy {host}:8123
} }
http://zigbee2mqtt.lan { http://zigbee2mqtt.{$DOMAIN} {
reverse_proxy zigbee2mqtt:8080 reverse_proxy zigbee2mqtt:8080
} }
http://jellyfin.lan { http://jellyfin.{$DOMAIN} {
reverse_proxy jellyfin:8096 reverse_proxy jellyfin:8096
} }
http://paperless.lan { http://paperless.{$DOMAIN} {
reverse_proxy paperless-ngx:8000 reverse_proxy paperless-ngx:8000
} }
http://download.lan { http://download.{$DOMAIN} {
reverse_proxy pyload:8000 reverse_proxy pyload:8000
} }
http://uptime.lan { http://uptime.{$DOMAIN} {
reverse_proxy uptime-kuma:3001 reverse_proxy uptime-kuma:3001
} }
http://torrent.lan { http://torrent.{$DOMAIN} {
reverse_proxy transmission:9091 reverse_proxy transmission:9091
} }
:80, :443 { :80, :443 {
respond 404 respond "404 Not Found" 404
handle_errors {
respond "{err.status_code} {err.status_text}" {err.status_code}
}
} }

View file

@ -11,6 +11,8 @@ services:
- ./Caddyfile:/etc/caddy/Caddyfile:ro - ./Caddyfile:/etc/caddy/Caddyfile:ro
networks: networks:
- web - web
environment:
- DOMAIN=${DOMAIN}
whoami: whoami: