deploy:修改部署文档

This commit is contained in:
fanxb 2023-05-10 20:30:42 +08:00
parent f502348786
commit faedc09771
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,9 @@
FROM node:lts-buster-slim FROM node:lts-buster-slim
WORKDIR /app WORKDIR /app
COPY ./openRenamerBackend /app COPY ./openRenamerBackend /app
RUN chmod 777 -R /app && npm install -g pnpm typescript --registry https://registry.npmmirror.com # RUN chmod 777 -R /app && npm install -g pnpm typescript --registry https://registry.npmmirror.com
# 注意此处未添加npm代理
RUN chmod 777 -R /app && npm install -g pnpm typescript
ENV PORT 80 ENV PORT 80
CMD ["bash", "start.sh"] CMD ["bash", "start.sh"]

View File

@ -2,7 +2,9 @@
base=$(cd "$(dirname "$0")";pwd) base=$(cd "$(dirname "$0")";pwd)
cd $base cd $base
rm -rf openRenamerBackend/dist rm -rf openRenamerBackend/dist
docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerFront:/opt/front node:lts-slim bash -c "cd /opt/front && npm install -g pnpm --registry https://registry.npmmirror.com && pnpm install --registry https://registry.npmmirror.com && pnpm run build" # 注意此处未添加npm代理
# docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerFront:/opt/front node:lts-slim bash -c "cd /opt/front && npm install -g pnpm --registry https://registry.npmmirror.com && pnpm install --registry https://registry.npmmirror.com && pnpm run build"
docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerFront:/opt/front node:lts-slim bash -c "cd /opt/front && npm install -g pnpm && pnpm install && pnpm run build"
rm -rf openRenamerBackend/static/* rm -rf openRenamerBackend/static/*
touch openRenamerBackend/static/.gitkeep touch openRenamerBackend/static/.gitkeep