From ecc107b54e59e5f1ee4f5c32104d527b4545bceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen-Kristjan=20P=C3=A4ll?= Date: Fri, 6 Feb 2026 02:29:57 +0200 Subject: [PATCH] config.yaml: add caddy --- config.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/config.yaml b/config.yaml index a6ddb8a..dd252d8 100644 --- a/config.yaml +++ b/config.yaml @@ -9,6 +9,8 @@ passwd: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOpw3cIAdtWOYUkb6UOAIcLuRzItoo4oZMzr/hzZYq4E openpgp:0xFAAA0172 storage: + directories: + - path: /var/www/html files: # hostname - path: /etc/hostname @@ -31,6 +33,21 @@ storage: inline: | 127.0.0.1 localhost akpella.lan ::1 localhost akpella.lan + - path: /etc/caddy/Caddyfile + contents: + inline: | + fst.ee { + root * /var/www/html + file_server + } + + matrix.fst.ee { + reverse_proxy localhost:8008 + } + - path: /var/www/html/index.html + contents: + inline: | +

no

systemd: units: @@ -59,3 +76,22 @@ systemd: [Install] WantedBy=multi-user.target + - name: caddy.service + enabled: true + contents: | + [Unit] + Description=Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. + After=docker.service + Requires=docker.service + + [Service] + ExecStart=docker run \ + --name=caddy \ + --mount type=bind,src=/etc/caddy,dst=/etc/caddy \ + --mount type=bind,src=/var/www/html,dst=/var/www/html \ + -p 80:80 \ + -p 443:443 \ + caddy:latest + + [Install] + WantedBy=multi-user.target