diff --git a/README.md b/README.md index b423913..f84ec27 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ pnpm release # docker 启动 docker run -d --name mediago -p 8899:8899 -v /root/mediago:/root/mediago registry.cn-beijing.aliyuncs.com/caorushizi/mediago + +# 构建 docker 镜像 +docker buildx build -t caorushizi/mediago:latest . ``` ## Releases diff --git a/package.json b/package.json index 6e2df7e..8b0c87c 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "build:backend": "pnpm -F backend run build", "build:renderer": "pnpm -F renderer run build", "build:mobile": "pnpm -F mobile run build", - "build:docker": "tsx scripts/web.ts && docker buildx build -t caorushizi/mediago:latest .", + "build:web-release": "tsx scripts/web.ts", "rebuild:web": "pnpm -F backend rebuild", "rebuild:electron": "pnpm -F main run rebuild", "beta": "pnpm run build && pnpm -F mediago run pack", diff --git a/packages/backend/scripts/index.ts b/packages/backend/scripts/index.ts index 14eda89..8546473 100644 --- a/packages/backend/scripts/index.ts +++ b/packages/backend/scripts/index.ts @@ -19,7 +19,11 @@ async function buildClean() { } async function copyBin() { - const source = mainResolve("../main/bin", isDev ? process.platform : "linux"); + const source = mainResolve( + "../main/bin", + isDev ? process.platform : "linux", + process.arch, + ); const target = mainResolve("dist/server/bin"); fs.cpSync(source, target, { recursive: true, diff --git a/packages/renderer/src/utils/socket.ts b/packages/renderer/src/utils/socket.ts index 700c501..ade9537 100644 --- a/packages/renderer/src/utils/socket.ts +++ b/packages/renderer/src/utils/socket.ts @@ -6,7 +6,8 @@ export function getSocket() { return _instance; } - _instance = io("http://localhost:8899", { + _instance = io({ + host: "http://localhost:8899", extraHeaders: { "Access-Control-Request-Private-Network": "true", },