Skip to content

Commit

Permalink
modify dockerfile and script
Browse files Browse the repository at this point in the history
  • Loading branch information
tpps88206 committed Jul 31, 2021
1 parent ab82918 commit b9695d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ COPY ./server /app/server

# build
WORKDIR /app/server
RUN npm install
RUN npm build
RUN echo "01 01-13 * * 1-5 node /app/server/lib/index.js" >> crontab.tmp \
RUN yarn
RUN yarn tsc
RUN echo "01 01-13 * * 1-5 node /app/server/lib/main.js" >> crontab.tmp \
&& crontab crontab.tmp \
&& rm -rf crontab.tmp

CMD ["crond","-f"]
CMD ["crond","-f"]
4 changes: 2 additions & 2 deletions scripts/runScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

if [ -f "./server/src/configs/serviceAccountKey.json" ]; then
docker build -f scripts/Dockerfile -t jira2notion:latest .
docker stop jira2notion
docker rm jira2notion
docker stop jira2notion || true
docker rm jira2notion || true
docker run --name jira2notion -dit jira2notion
docker image prune -f
else
Expand Down
4 changes: 2 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"tsc": "tsc",
"dev": "node lib/main.js",
"start": "npm run build && npm run dev",
"start": "yarn tsc && yarn dev",
"lint": "eslint . --ext .ts",
"prepare": "cd .. && husky install server/.husky"
}
Expand Down

0 comments on commit b9695d4

Please sign in to comment.