Initial configuration
This commit is contained in:
8
caddy/Dockerfile
Normal file
8
caddy/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM caddy:2.8-builder AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/cloudflare
|
||||
|
||||
FROM caddy:2.8
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
4
caddy/README.md
Normal file
4
caddy/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Caddy reverse proxy
|
||||
|
||||
1. Obtain cloudflare tokens: [Caddy Cloudflare](https://github.com/caddy-dns/cloudflare)
|
||||
2. Set environment variables
|
21
caddy/caddyfiles/Caddyfile
Normal file
21
caddy/caddyfiles/Caddyfile
Normal file
@@ -0,0 +1,21 @@
|
||||
localhost {
|
||||
respond "Hello world!"
|
||||
}
|
||||
|
||||
|
||||
*.timo.bmrs.nl timo.bmrs.nl {
|
||||
tls {
|
||||
dns cloudflare {
|
||||
zone_token {env.CF_ZONE_TOKEN}
|
||||
api_token {env.CF_API_TOKEN}
|
||||
}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
forward_auth authelia:9091 {
|
||||
uri /api/authz/forward-auth
|
||||
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
||||
}
|
||||
|
||||
import routes/*
|
||||
}
|
4
caddy/caddyfiles/routes/adguard
Normal file
4
caddy/caddyfiles/routes/adguard
Normal file
@@ -0,0 +1,4 @@
|
||||
@adguard host adguard.timo.bmrs.nl
|
||||
handle @adguard {
|
||||
reverse_proxy adguardhome:3000
|
||||
}
|
9
caddy/caddyfiles/routes/authelia
Normal file
9
caddy/caddyfiles/routes/authelia
Normal file
@@ -0,0 +1,9 @@
|
||||
@ldap host ldap.timo.bmrs.nl
|
||||
handle @ldap {
|
||||
reverse_proxy lldap:17170
|
||||
}
|
||||
|
||||
@authelia host auth.timo.bmrs.nl
|
||||
handle @authelia {
|
||||
reverse_proxy authelia:9091
|
||||
}
|
9
caddy/caddyfiles/routes/dozzle
Normal file
9
caddy/caddyfiles/routes/dozzle
Normal file
@@ -0,0 +1,9 @@
|
||||
@dozzle host dozzle.timo.bmrs.nl
|
||||
handle @dozzle {
|
||||
forward_auth authelia:9091 {
|
||||
uri /api/authz/forward-auth
|
||||
copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
|
||||
}
|
||||
|
||||
reverse_proxy dozzle:8080
|
||||
}
|
4
caddy/caddyfiles/routes/forgejo
Normal file
4
caddy/caddyfiles/routes/forgejo
Normal file
@@ -0,0 +1,4 @@
|
||||
@forgejo host git.timo.bmrs.nl
|
||||
handle @forgejo {
|
||||
reverse_proxy forgejo:3000
|
||||
}
|
4
caddy/caddyfiles/routes/homeassistant
Normal file
4
caddy/caddyfiles/routes/homeassistant
Normal file
@@ -0,0 +1,4 @@
|
||||
@homeassistant host homeassistant.timo.bmrs.nl
|
||||
handle @homeassistant {
|
||||
reverse_proxy homeassistant:8123
|
||||
}
|
4
caddy/caddyfiles/routes/homepage
Normal file
4
caddy/caddyfiles/routes/homepage
Normal file
@@ -0,0 +1,4 @@
|
||||
@homepage host home.timo.bmrs.nl
|
||||
handle @homepage {
|
||||
reverse_proxy homepage:3000
|
||||
}
|
4
caddy/caddyfiles/routes/immich
Normal file
4
caddy/caddyfiles/routes/immich
Normal file
@@ -0,0 +1,4 @@
|
||||
@immich host immich.timo.bmrs.nl
|
||||
handle @immich {
|
||||
reverse_proxy immich:2283
|
||||
}
|
12
caddy/caddyfiles/routes/nextcloud
Normal file
12
caddy/caddyfiles/routes/nextcloud
Normal file
@@ -0,0 +1,12 @@
|
||||
@nextcloud host cloud.timo.bmrs.nl
|
||||
handle @nextcloud {
|
||||
redir /.well-known/carddav /remote.php/dav/ 301
|
||||
redir /.well-known/caldav /remote.php/dav/ 301
|
||||
|
||||
reverse_proxy nextcloud:80
|
||||
}
|
||||
|
||||
@office host office.timo.bmrs.nl
|
||||
handle @office {
|
||||
reverse_proxy nextcloud-office:9980
|
||||
}
|
4
caddy/caddyfiles/routes/paperless-ngx
Normal file
4
caddy/caddyfiles/routes/paperless-ngx
Normal file
@@ -0,0 +1,4 @@
|
||||
@paperless-ngx host paperless.timo.bmrs.nl
|
||||
handle @paperless-ngx {
|
||||
reverse_proxy paperless-ngx:8000
|
||||
}
|
4
caddy/caddyfiles/routes/searxng
Normal file
4
caddy/caddyfiles/routes/searxng
Normal file
@@ -0,0 +1,4 @@
|
||||
@searxng host search.timo.bmrs.nl
|
||||
handle @searxng {
|
||||
reverse_proxy searxng:8080
|
||||
}
|
4
caddy/caddyfiles/routes/uptime-kuma
Normal file
4
caddy/caddyfiles/routes/uptime-kuma
Normal file
@@ -0,0 +1,4 @@
|
||||
@uptime-kuma host uptime.timo.bmrs.nl
|
||||
handle @uptime-kuma {
|
||||
reverse_proxy uptime-kuma:3001
|
||||
}
|
4
caddy/caddyfiles/routes/vaultwarden
Normal file
4
caddy/caddyfiles/routes/vaultwarden
Normal file
@@ -0,0 +1,4 @@
|
||||
@vaultwarden host bitwarden.timo.bmrs.nl
|
||||
handle @vaultwarden {
|
||||
reverse_proxy vaultwarden:80
|
||||
}
|
33
caddy/docker-compose.yml
Normal file
33
caddy/docker-compose.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
services:
|
||||
caddy:
|
||||
build: .
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 443:443/udp
|
||||
volumes:
|
||||
- data:/data
|
||||
- config:/config
|
||||
- ./caddyfiles:/etc/caddy/
|
||||
environment:
|
||||
CF_ZONE_TOKEN: ${CF_ZONE_TOKEN}
|
||||
CF_API_TOKEN: ${CF_API_TOKEN}
|
||||
networks:
|
||||
proxy:
|
||||
aliases:
|
||||
- auth.timo.bmrs.nl
|
||||
- cloud.timo.bmrs.nl
|
||||
- office.timo.bmrs.nl
|
||||
|
||||
volumes:
|
||||
data:
|
||||
config:
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
name: proxy
|
||||
external: true
|
Reference in New Issue
Block a user