deployment templates for lichen
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

caddy: serve static site content directly from dist/

Caddy now serves files from each site's dist/ directory for normal
visitors, only proxying to the Rust app for CMS/auth/API/websocket
paths. Falls back to the app if no static file is found.

authored by

notplants and committed by
notplants
2fbe5a04 6730c096

+20 -1
+19 -1
docker-compose/Caddyfile
··· 8 8 tls { 9 9 on_demand 10 10 } 11 - reverse_proxy app:9000 11 + 12 + # paths that require the rust app (CMS, auth, API, websockets, etc.) 13 + @app path /cms/* /ws/* /login/* /logout/* /static/* /api/* /tls-check /git/* /publish/* /oauth/* /oidc/* /shell/* /assets/yjs-bundle.iife.js 14 + handle @app { 15 + reverse_proxy app:9000 16 + } 17 + 18 + # static site content served directly from dist/ 19 + handle { 20 + root * /sites/{host}/dist 21 + @static file {path} {path}/index.html {path}index.html 22 + handle @static { 23 + file_server 24 + } 25 + # fall back to app if no static file found 26 + handle { 27 + reverse_proxy app:9000 28 + } 29 + } 12 30 } 13 31 14 32 :80 {
+1
docker-compose/docker-compose.yml
··· 39 39 volumes: 40 40 - ./Caddyfile:/etc/caddy/Caddyfile:ro 41 41 - caddy_data:/data 42 + - lichen_data:/sites:ro 42 43 restart: unless-stopped 43 44 44 45 networks: