mount caddyfiles from the services

authelia
Jonathan Dahan 2 years ago
parent 33949b53a0
commit 7853e29727

@ -27,7 +27,8 @@ One simple way is to allow unprivileged users access to these low ports
- [x] caddy for homepage - [x] caddy for homepage
- [x] webdav for personal home pages - [x] webdav for personal home pages
- [ ] authelia sso - [?] authelia sso
- [x] mount caddy files from service compose files
- [ ] backup using duplicity uploaded to backblaze b2 - [ ] backup using duplicity uploaded to backblaze b2
- [ ] restore using duplicity downloaded from backblaze b2 - [ ] restore using duplicity downloaded from backblaze b2
- [ ] ~~zitadel sso~~ - [ ] ~~zitadel sso~~

@ -53,6 +53,10 @@ services:
restart: no restart: no
entrypoint: [ "/generate-secrets.sh", "/secrets" ] entrypoint: [ "/generate-secrets.sh", "/secrets" ]
caddy:
volumes:
- ./authelia/Proxyfile:/etc/caddy.d/authelia:ro
volumes: volumes:
postgres-data: postgres-data:
authelia-config: authelia-config:

@ -1,4 +1,4 @@
version: "3.7" version: "3.8"
services: services:
caddy: caddy:

@ -4,10 +4,4 @@
} }
} }
web.{$DOMAIN} { import /etc/caddy.d/*
reverse_proxy web:4431
}
login.{$DOMAIN} {
reverse_proxy authelia:9091
}

@ -35,9 +35,21 @@ There are three things to think about when adding a service:
Generally, zitadel has some cli commands that we have put in scripts in the zitadel folder. Generally, zitadel has some cli commands that we have put in scripts in the zitadel folder.
2. How to expose as a subdomain in caddy? 2. How to expose as a subdomain?
You will want to make a Caddyfile, which will get mounted by the Caddy compose file. Add a volume mount of your reverse proxy config to your compose file.
# in the services: part of your compose file
caddy:
volumes:
- ./some-service/Proxyfile:/etc/caddy.d/some-service
# Proxyfile looks something like
someservice.{$DOMAIN} {
reverse_proxy someservice:4321
}
3. How will this be backed up and restored? 3. How will this be backed up and restored?

@ -1,4 +1,4 @@
version: "3.7" version: "3.8"
services: services:
web: web:
@ -18,5 +18,9 @@ services:
environment: environment:
- DOMAIN - DOMAIN
caddy:
volumes:
- ./web/Proxyfile:/etc/caddy.d/web:ro
volumes: volumes:
caddy_config: caddy_config:

Loading…
Cancel
Save