Pulumi code for my server setup
0
fork

Configure Feed

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

add did:web

+63
+38
services/haring/atproto/did-web.ts
··· 1 + import { ContainerService } from "~lib/service/service"; 2 + import didweb from "./did.json"; 3 + import { DnsRecord } from "@pulumi/cloudflare"; 4 + import { getEnv } from "~lib/env"; 5 + 6 + const CADDYFILE = ` 7 + :80 { 8 + handle /.well-known/did.json { 9 + respond ${JSON.stringify(didweb)} 200 10 + } 11 + } 12 + `; 13 + 14 + export const didwebCaddyService = new ContainerService("didweb", { 15 + image: "caddy", 16 + servicePort: 80, 17 + hostRule: "Host(`bas.sh`) && Path(`/.well-known/did.json`)", 18 + hostRulePriority: 1000, 19 + command: ["/bin/sh", "-c", `echo '${CADDYFILE}' | caddy run --config - --adapter caddyfile`], 20 + middlewares: ["cors"], 21 + }); 22 + 23 + export const didwebDnsRecord = new DnsRecord(`didweb`, { 24 + zoneId: getEnv("CLOUDFLARE_ZONE_ID"), 25 + name: `also.bas.sh`, 26 + ttl: 1, 27 + type: "CNAME", 28 + content: "haring.bas.sh", 29 + proxied: false, 30 + }); 31 + 32 + export const didwebDidDnsRecord = new DnsRecord(`didweb-did`, { 33 + zoneId: getEnv("CLOUDFLARE_ZONE_ID"), 34 + name: `_atproto.also.bas.sh`, 35 + ttl: 1, 36 + type: "TXT", 37 + content: `"did=did:web:bas.sh"`, 38 + });
+24
services/haring/atproto/did.json
··· 1 + { 2 + "@context": [ 3 + "https://www.w3.org/ns/did/v1", 4 + "https://w3id.org/security/multikey/v1", 5 + "https://w3id.org/security/suites/secp256k1-2019/v1" 6 + ], 7 + "id": "did:web:bas.sh", 8 + "alsoKnownAs": ["at://also.bas.sh"], 9 + "verificationMethod": [ 10 + { 11 + "id": "did:web:bas.sh#atproto", 12 + "type": "Multikey", 13 + "controller": "did:web:bas.sh", 14 + "publicKeyMultibase": "zQ3sheGf8QLgkN6kv7AdwefVrF5j3rB9bNyDSeA2PRcAFvNZJ" 15 + } 16 + ], 17 + "service": [ 18 + { 19 + "id": "#atproto_pds", 20 + "type": "AtprotoPersonalDataServer", 21 + "serviceEndpoint": "https://tranquil.bas.sh" 22 + } 23 + ] 24 + }
+1
services/haring/index.ts
··· 56 56 export * from "./files/stash"; 57 57 export * from "./files/synclounge"; 58 58 59 + export * from "./atproto/did-web"; 59 60 export * from "./atproto/tranquil/tranquil"; 60 61 export * from "./atproto/pegasus"; 61 62 export * from "./atproto/pds/pds";