Skip to content

Commit

Permalink
deploy:修改部署文档
Browse files Browse the repository at this point in the history
  • Loading branch information
FleyX committed May 10, 2023
1 parent f502348 commit faedc09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM node:lts-buster-slim
WORKDIR /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
CMD ["bash", "start.sh"]

Expand Down
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
base=$(cd "$(dirname "$0")";pwd)
cd $base
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/*
touch openRenamerBackend/static/.gitkeep
Expand Down

0 comments on commit faedc09

Please sign in to comment.