From 9d41087e26baa50607a140303cdbe0e39b398715 Mon Sep 17 00:00:00 2001 From: fanxb Date: Mon, 18 Jul 2022 10:48:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?deploy:=E5=9C=A8=E9=95=9C=E5=83=8F=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E5=AE=89=E8=A3=85=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 2 -- openRenamerBackend/start.sh | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 openRenamerBackend/start.sh diff --git a/build.sh b/build.sh index fa96a2e..c31015e 100644 --- a/build.sh +++ b/build.sh @@ -7,7 +7,5 @@ rm -rf openRenamerBackend/static/* touch openRenamerBackend/static/.gitkeep mv openRenamerFront/dist/* openRenamerBackend/static -docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerBackend:/opt/backend node:lts-buster-slim bash -c "cd /opt/backend && yarn config set registry https://registry.npm.taobao.org && yarn global add typescript && yarn && tsc" - # docker镜像打包 # docker build -t fleyx/open-renamer:0.3 . \ No newline at end of file diff --git a/openRenamerBackend/start.sh b/openRenamerBackend/start.sh new file mode 100644 index 0000000..94f481f --- /dev/null +++ b/openRenamerBackend/start.sh @@ -0,0 +1 @@ +yarn config set registry https://registry.npm.taobao.org && yarn global add typescript && yarn && tsc && node dist/index.js \ No newline at end of file From d4bd8d4f4f960bf0c4be71109d3f7d137fcae594 Mon Sep 17 00:00:00 2001 From: fanxb Date: Mon, 18 Jul 2022 10:59:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=BB=A5=E5=85=BC=E5=AE=B9arm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 +++++- Dockerfile | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 35fc111..99c25e6 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,8 @@ dist # TernJS port file .tern-port -data \ No newline at end of file +data +/.idea/.gitignore +/.idea/modules.xml +/.idea/open-renamer.iml +/.idea/vcs.xml diff --git a/Dockerfile b/Dockerfile index d5eeda3..874282c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM node:lts-buster-slim WORKDIR /app copy ./openRenamerBackend /app ENV PORT 80 -CMD ["/usr/local/bin/node", "dist/index.js"] +CMD ["bash", "start.sh"]