static, scriptless homepage for my pds (pds.jeanmachine.dev)
at main 48 lines 1.3 kB view raw view rendered
1# pds-home 2 3This is a static homepage for my Personal Data Server, [pds.jeanmachine.dev](https://pds.jeanmachine.dev). 4 5My PDS uses the [typescript implementation](https://github.com/bluesky-social/atproto/tree/main/packages/pds) provided by Bluesky PBC, and uses their container image. To set this up, I made the following changes to my Caddyfile (located at `/pds/caddy/etc/caddy/Caddyfile`) and Docker compose file (locatede at `/pds/compose.yaml`). I store this repository at `/pds/static` on my PDS server. 6 7Caddyfile: 8 9```caddy 10# important to seperate the wildcard from the root. 11*.pds.jeanmachine.dev { 12 tls { 13 on_demand 14 } 15 reverse_proxy http://localhost:3000 16} 17 18pds.jeanmachine.dev { 19 tls { 20 on_demand 21 } 22 # this is where I store the static site. 23 @static path / /index.css /favicon.ico /assets/* /fonts/* 24 handle @static { 25 root * /static 26 file_server 27 } 28 # handle everything that isnt the static site/it's assets with the regular proxy 29 handle { 30 reverse_proxy http://localhost:3000 31 } 32} 33``` 34 35Docker Compose: 36 37```yaml 38volumes: 39 - type: bind 40 source: /pds/caddy/data 41 target: /data 42 - type: bind 43 source: /pds/caddy/etc/caddy 44 target: /etc/caddy 45 - type: bind # this is the new binding in my compose; everything else is the same. 46 source: /pds/static 47 target: /static 48```