build(build): 📦 新增docker-compose配置(Beta)

在根目录添加cargo镜像源配置
This commit is contained in:
nongyehong
2024-12-10 10:43:38 +08:00
parent d940838f38
commit 688d2dd862
3 changed files with 22 additions and 2 deletions

6
.cargo/config Normal file
View File

@@ -0,0 +1,6 @@
## 配置cargo的国内源 (依赖很多所以还是需要慢慢等待,不至于卡死下载不了)
[source.crates-io]
replace-with = 'mirror'
[source.mirror]
registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"

View File

@@ -33,11 +33,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
# 安装 pnpm
- name: Install pnpm
run: npm install -g pnpm@9.2.0
run: npm install -g pnpm@latest
- name: Install dependencies
run: pnpm install

14
docker-compose.yaml Normal file
View File

@@ -0,0 +1,14 @@
version: "3.7"
services:
tauri:
image: ivangabriele/tauri:debian-bullseye-18 # 使用该镜像打包tauri
volumes:
- .:/app
command:
- "sh"
- "-c"
- | # 使用|表示下面的命令将按照顺序执行
cd /app
npm config set registry https://registry.npmmirror.com
pnpm install
pnpm tauri build