forked from
lewis.moe/bspds-sandbox
I've been saying "PDSes seem easy enough, they're what, some CRUD to a db? I can do that in my sleep". well i'm sleeping rn so let's go
Tranquil PDS on Kubernetes#
If you're reaching for kubernetes for this app, you're experienced enough to know how to spin up:
- cloudnativepg (or your preferred postgres operator)
- valkey
- s3-compatible object storage (minio operator, or just use a managed service)
- the app itself (it's just a container with some env vars)
You'll need a wildcard TLS certificate for *.your-pds-hostname.example.com. User handles are served as subdomains.
The container image expects:
DATABASE_URL- postgres connection stringS3_ENDPOINT,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,S3_BUCKETBACKUP_S3_BUCKET- bucket for repo backups (optional but recommended)VALKEY_URL- redis:// connection stringPDS_HOSTNAME- your PDS hostname (without protocol)JWT_SECRET,DPOP_SECRET,MASTER_KEY- generate withopenssl rand -base64 48CRAWLERS- typicallyhttps://bsky.networkand more, check the .env.example.
Health check: GET /xrpc/_health
Custom Homepage#
Mount a ConfigMap with your homepage.html into the container's frontend directory and it becomes your landing page. Go nuts with it. Account dashboard is at /app/ so you won't break anything.
apiVersion: v1
kind: ConfigMap
metadata:
name: pds-homepage
data:
homepage.html: |
<!DOCTYPE html>
<html>
<head><title>Welcome to my PDS</title></head>
<body>
<h1>Welcome to my little evil secret lab!!!</h1>
<p><a href="/app/">Sign in</a></p>
</body>
</html>