Adding a first iteration

This commit is contained in:
edipretoro 2025-11-10 18:31:10 +01:00
parent bdbd024996
commit 3852509643
4 changed files with 52 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env

10
Caddyfile Normal file
View File

@ -0,0 +1,10 @@
:80 {
# Rewrites destination to remove host and include only the path e.g. /test.txt
@hasDest header_regexp dest Destination ^https?://[^/]+(.*)$
request_header @hasDest Destination {re.dest.1}
reverse_proxy booxdav:6065 {
header_up X-Real-IP {remote_host}
header_up REMOTE-HOST {remote_host}
}
}

7
config.yml Normal file
View File

@ -0,0 +1,7 @@
directory: /data
permissions: none
users:
- username: "{env}BOOXDAV_USERNAME"
password: "{env}BOOXDAV_PASSWORD"
permissions: CRUD

34
docker-compose.yml Normal file
View File

@ -0,0 +1,34 @@
networks:
traefik:
external: true
booxdav:
services:
booxdav:
image: ghcr.io/hacdias/webdav
container_name: booxdav
volumes:
- ./etc/config.yml:/config.yml:ro
- ./var/data:/data
env_file:
- .env
command: ["-c", "/config.yml"]
restart: unless-stopped
networks:
- booxdav
caddy-dav:
image: caddy:2-alpine
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
depends_on:
- booxdav
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.booxdav.tls.certresolver=ovhtls"
- "traefik.http.routers.booxdav.service=caddy-dav"
- "traefik.http.services.booxdav.loadbalancer.server.port=80"
- "traefik.http.services.booxdav.loadbalancer.passhostheader=true"
- "traefik.http.routers.booxdav.rule=Host(`booxdav.edipretoro.be`)"
networks:
- traefik
- booxdav