fix pdsls
This commit is contained in:
parent
a45ba54323
commit
c3d75140d8
@ -20,6 +20,10 @@ https://github.com/bluesky-social/atproto
|
|||||||
- https://plc.syu.is/did:plc:6qyecktefllvenje24fcxnie
|
- https://plc.syu.is/did:plc:6qyecktefllvenje24fcxnie
|
||||||
- https://plc.directory/did:plc:ytvoptig4ddshmwdsjmhtcym
|
- https://plc.directory/did:plc:ytvoptig4ddshmwdsjmhtcym
|
||||||
|
|
||||||
|
[@yui.syui.ai](https://bsky.app/profile/did:plc:4hqjfn7m6n5hno3doamuhgef)
|
||||||
|
|
||||||
|
- https://pds.syu.is/at://did:plc:4hqjfn7m6n5hno3doamuhgef
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ curl -sL syu.is/xrpc/_health
|
$ curl -sL syu.is/xrpc/_health
|
||||||
{"version":"0.4.65"}
|
{"version":"0.4.65"}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM node:20
|
FROM node:21
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -3,4 +3,4 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
ports:
|
ports:
|
||||||
- 3000:13213
|
- 3001:13213
|
||||||
|
@ -1,15 +1,47 @@
|
|||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import solidPlugin from "vite-plugin-solid";
|
import solidPlugin from "vite-plugin-solid";
|
||||||
import UnoCSS from "unocss/vite";
|
import UnoCSS from "unocss/vite";
|
||||||
|
import metadata from "./public/client-metadata.json";
|
||||||
|
|
||||||
const SERVER_HOST = "0.0.0.0";
|
const SERVER_HOST = "0.0.0.0";
|
||||||
const SERVER_PORT = 13213;
|
const SERVER_PORT = 13213;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [UnoCSS(), solidPlugin()],
|
plugins: [
|
||||||
|
UnoCSS(),
|
||||||
|
solidPlugin(),
|
||||||
|
// Injects OAuth-related variables
|
||||||
|
{
|
||||||
|
name: "oauth",
|
||||||
|
config(_conf, { command }) {
|
||||||
|
if (command === "build") {
|
||||||
|
process.env.VITE_OAUTH_CLIENT_ID = metadata.client_id;
|
||||||
|
process.env.VITE_OAUTH_REDIRECT_URL = metadata.redirect_uris[0];
|
||||||
|
} else {
|
||||||
|
const redirectUri = ((): string => {
|
||||||
|
const url = new URL(metadata.redirect_uris[0]);
|
||||||
|
return `http://${SERVER_HOST}:${SERVER_PORT}${url.pathname}`;
|
||||||
|
})();
|
||||||
|
|
||||||
|
const clientId =
|
||||||
|
`http://localhost` +
|
||||||
|
`?redirect_uri=${encodeURIComponent(redirectUri)}` +
|
||||||
|
`&scope=${encodeURIComponent(metadata.scope)}`;
|
||||||
|
|
||||||
|
process.env.VITE_DEV_SERVER_PORT = "" + SERVER_PORT;
|
||||||
|
process.env.VITE_OAUTH_CLIENT_ID = clientId;
|
||||||
|
process.env.VITE_OAUTH_REDIRECT_URL = redirectUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
process.env.VITE_CLIENT_URI = metadata.client_uri;
|
||||||
|
process.env.VITE_OAUTH_SCOPE = metadata.scope;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
server: {
|
server: {
|
||||||
host: SERVER_HOST,
|
host: SERVER_HOST,
|
||||||
port: SERVER_PORT,
|
port: SERVER_PORT,
|
||||||
|
allowedHosts: ['pds.syu.is'],
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
target: "esnext",
|
target: "esnext",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user