mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
pnpm 版本降至 8.3.1
This commit is contained in:
parent
e1863407f2
commit
3d11210aeb
4
.github/workflows/build_docker_image.yml
vendored
4
.github/workflows/build_docker_image.yml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '8.3.1'
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
@ -99,7 +99,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: '8.3.1'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
|
@ -198,7 +198,7 @@ $ git clone git@github.com:whyour/qinglong.git
|
||||||
$ cd qinglong
|
$ cd qinglong
|
||||||
$ cp .env.example .env
|
$ cp .env.example .env
|
||||||
# Recommended use pnpm https://pnpm.io/zh/installation
|
# Recommended use pnpm https://pnpm.io/zh/installation
|
||||||
$ npm install -g pnpm
|
$ npm install -g pnpm@8.3.1
|
||||||
$ pnpm install
|
$ pnpm install
|
||||||
$ pnpm start
|
$ pnpm start
|
||||||
```
|
```
|
||||||
|
|
|
@ -197,7 +197,7 @@ $ git clone git@github.com:whyour/qinglong.git
|
||||||
$ cd qinglong
|
$ cd qinglong
|
||||||
$ cp .env.example .env
|
$ cp .env.example .env
|
||||||
# 推荐使用 pnpm https://pnpm.io/zh/installation
|
# 推荐使用 pnpm https://pnpm.io/zh/installation
|
||||||
$ npm install -g pnpm
|
$ npm install -g pnpm@8.3.1
|
||||||
$ pnpm install
|
$ pnpm install
|
||||||
$ pnpm start
|
$ pnpm start
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@ COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk update \
|
&& apk update \
|
||||||
&& apk add nodejs npm git \
|
&& apk add nodejs npm git \
|
||||||
&& npm i -g pnpm \
|
&& npm i -g pnpm@8.3.1 \
|
||||||
&& cd /tmp/build \
|
&& cd /tmp/build \
|
||||||
&& pnpm --registry https://registry.npmmirror.com install --prod
|
&& pnpm --registry https://registry.npmmirror.com install --prod
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ RUN set -x \
|
||||||
&& git config --global user.email "qinglong@@users.noreply.github.com" \
|
&& git config --global user.email "qinglong@@users.noreply.github.com" \
|
||||||
&& git config --global user.name "qinglong" \
|
&& git config --global user.name "qinglong" \
|
||||||
&& git config --global http.postBuffer 524288000 \
|
&& git config --global http.postBuffer 524288000 \
|
||||||
&& npm install -g pnpm \
|
&& npm install -g pnpm@8.3.1 \
|
||||||
&& cd && pnpm config set registry https://registry.npmmirror.com \
|
&& cd && pnpm config set registry https://registry.npmmirror.com \
|
||||||
&& pnpm add -g pm2 tsx \
|
&& pnpm add -g pm2 tsx \
|
||||||
&& rm -rf /root/.pnpm-store \
|
&& rm -rf /root/.pnpm-store \
|
||||||
|
@ -72,7 +72,7 @@ COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/
|
||||||
|
|
||||||
WORKDIR ${QL_DIR}
|
WORKDIR ${QL_DIR}
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --timeout=2s --retries=10 \
|
HEALTHCHECK --interval=5s --timeout=2s --retries=20 \
|
||||||
CMD curl -sf http://127.0.0.1:5400/api/health || exit 1
|
CMD curl -sf http://127.0.0.1:5400/api/health || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
||||||
|
|
|
@ -23,7 +23,7 @@ current_npm_registry=$(cd && pnpm config get registry)
|
||||||
is_equal_registry=$(echo $current_npm_registry | grep "${NpmMirror}")
|
is_equal_registry=$(echo $current_npm_registry | grep "${NpmMirror}")
|
||||||
if [[ "$is_equal_registry" == "" ]]; then
|
if [[ "$is_equal_registry" == "" ]]; then
|
||||||
cd && pnpm config set registry $NpmMirror
|
cd && pnpm config set registry $NpmMirror
|
||||||
pnpm install -g --force
|
pnpm install -g
|
||||||
fi
|
fi
|
||||||
update_depend
|
update_depend
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -6,13 +6,11 @@ reset_env() {
|
||||||
echo -e "---> 配置文件检测完成\n"
|
echo -e "---> 配置文件检测完成\n"
|
||||||
|
|
||||||
echo -e "---> 2. 开始安装青龙依赖\n"
|
echo -e "---> 2. 开始安装青龙依赖\n"
|
||||||
rm -rf $dir_root/node_modules
|
|
||||||
npm_install_2 $dir_root
|
npm_install_2 $dir_root
|
||||||
echo -e "---> 青龙依赖安装完成\n"
|
echo -e "---> 青龙依赖安装完成\n"
|
||||||
|
|
||||||
echo -e "---> 3. 开始安装脚本依赖\n"
|
echo -e "---> 3. 开始安装脚本依赖\n"
|
||||||
cp -f $dir_sample/package.json $dir_scripts/package.json
|
cp -f $dir_sample/package.json $dir_scripts/package.json
|
||||||
rm -rf $dir_scripts/node_modules
|
|
||||||
npm_install_2 $dir_scripts
|
npm_install_2 $dir_scripts
|
||||||
echo -e "---> 脚本依赖安装完成\n"
|
echo -e "---> 脚本依赖安装完成\n"
|
||||||
}
|
}
|
||||||
|
@ -84,7 +82,7 @@ start_public() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
echo -e "=====> 开始检测"
|
echo -e "=====> 开始检测"
|
||||||
npm i -g pnpm
|
npm i -g pnpm@8.3.1
|
||||||
patch_version
|
patch_version
|
||||||
|
|
||||||
apk add procps
|
apk add procps
|
||||||
|
@ -94,7 +92,7 @@ main() {
|
||||||
fi
|
fi
|
||||||
if [[ $NpmMirror ]]; then
|
if [[ $NpmMirror ]]; then
|
||||||
cd && pnpm config set registry $NpmMirror
|
cd && pnpm config set registry $NpmMirror
|
||||||
pnpm install -g --force
|
pnpm install -g
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pnpm add -g pm2 tsx
|
pnpm add -g pm2 tsx
|
||||||
|
|
Loading…
Reference in New Issue
Block a user