再次修改docker
This commit is contained in:
@@ -8,7 +8,7 @@ RUN npm config set registry https://registry.npmmirror.com
|
||||
WORKDIR /app
|
||||
|
||||
# 只拷依赖描述文件
|
||||
COPY package.json pnpm-lock.yaml .pnpm-workspace.yaml .npmrc ./
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
# 安装,结果是 /app/node_modules 和全局 pnpm cache
|
||||
RUN corepack enable && pnpm install --frozen-lockfile
|
||||
|
||||
|
@@ -1,17 +0,0 @@
|
||||
[phases.setup]
|
||||
nixPkgs = [
|
||||
"nodejs_22", # Nixpacks 已帮你加,这里显性写出来安全
|
||||
"sqlite" # 预编译好的 sqlite 库
|
||||
]
|
||||
|
||||
[phases.install]
|
||||
cmds = [
|
||||
"sudo apt-get update -y",
|
||||
"sudo apt-get install -y build-essential python3", # 上 gcc/make/python
|
||||
"pnpm config set script-shell '/bin/bash'", # 避免 sh -c 失环境
|
||||
"pnpm install --frozen-lockfile"
|
||||
]
|
||||
|
||||
# 可选:编译缓存,构建更快
|
||||
[phases.build]
|
||||
cacheDirectories = [ "node_modules/.cache" ]
|
Reference in New Issue
Block a user