Skip to content

Commit

Permalink
Merge pull request #322 from caorushizi/dev-docker-1
Browse files Browse the repository at this point in the history
feat: ✨  release scripts
  • Loading branch information
caorushizi authored Oct 7, 2024
2 parents 18afb89 + e5c4f00 commit c3d446a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion packages/backend/scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion packages/renderer/src/utils/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit c3d446a

Please sign in to comment.