From 480726cf71e8de5a530f7374b7d4687dd061d863 Mon Sep 17 00:00:00 2001 From: Charlotte Som Date: Wed, 11 Dec 2024 12:50:10 +0000 Subject: [PATCH] add labeler.charlotte.partners service --- ngx/build.sh | 1 + ngx/charlotte-partners-labeler.ts | 27 +++++++++++++++++++++ www/charlotte.partners/.well-known/did.json | 11 +++++++++ 3 files changed, 39 insertions(+) create mode 100644 ngx/charlotte-partners-labeler.ts diff --git a/ngx/build.sh b/ngx/build.sh index 4a8d183..f7fdbf8 100755 --- a/ngx/build.sh +++ b/ngx/build.sh @@ -6,3 +6,4 @@ deno run ./pds.ts > out/pds.conf deno run ./char-bun-how.ts > out/char-bun-how.conf deno run ./pds-testing.ts > out/pds-testing.conf deno run ./charlotte-partners.ts > out/charlotte-partners.conf +deno run ./charlotte-partners-labeler.ts > out/charlotte-partners-labeler.conf diff --git a/ngx/charlotte-partners-labeler.ts b/ngx/charlotte-partners-labeler.ts new file mode 100644 index 0000000..48955b2 --- /dev/null +++ b/ngx/charlotte-partners-labeler.ts @@ -0,0 +1,27 @@ +import ngx from "jsr:@char/ngx@0.1"; + +export const config = ngx("", [ + ngx("map $http_upgrade $connection_upgrade", [ + "default upgrade", + "'' close" + ]), + [], + ngx("server", [ + [ + "server_name labeler.charlotte.partners", + ...ngx.listen(), + ...ngx.letsEncrypt("labeler.charlotte.partners"), + ], + ngx("location /", [ + "client_max_body_size 1G", + "proxy_pass http://127.0.0.1:14831", + "proxy_http_version 1.1", + "proxy_set_header Upgrade $http_upgrade", + "proxy_set_header Connection $connection_upgrade", + "proxy_set_header Host $host", + "proxy_read_timeout 300s", + ]), + ]), +]); + +if (import.meta.main) console.log(config.build()); diff --git a/www/charlotte.partners/.well-known/did.json b/www/charlotte.partners/.well-known/did.json index 0326c48..6372ed8 100644 --- a/www/charlotte.partners/.well-known/did.json +++ b/www/charlotte.partners/.well-known/did.json @@ -14,6 +14,12 @@ "type": "Multikey", "controller": "did:web:charlotte.partners", "publicKeyMultibase": "zQ3shRnBKbRb8ECLZHs7YuJ8JPHkXiQPSDVwCsciXKrzDYdae" + }, + { + "id": "did:web:charlotte.partners#atproto_label", + "type": "Multikey", + "controller": "did:web:charlotte.partners", + "publicKeyMultibase": "zQ3shpoZGFs1e2HdYHAY58JKE2vtrD53vVLFj9dAbnTSgAQQG" } ], "service": [ @@ -21,6 +27,11 @@ "id": "#atproto_pds", "type": "AtprotoPersonalDataServer", "serviceEndpoint": "https://pds.bun.how" + }, + { + "id": "#atproto_labeler", + "type": "AtprotoLabeler", + "serviceEndpoint": "https://labeler.charlotte.partners" } ] }