FROM caddy:2.9

RUN echo -e ":3000 {\n\
    root * /var/www\n\
    header /.well-known* Content-Type application/json\n\
    header /.well-known/matrix/client Access-Control-Allow-Origin *\n\
    redir /d-i/trixie/preseed.cfg https://git.hswro.org/HSWro-infra/hswro-vm-provisioning/raw/branch/master/preseed.cfg temporary\n\
    file_server\n\
}" > /etc/caddy/Caddyfile
WORKDIR /var/www
