Skip to content

Commit

Permalink
Merge branch 'main' into manual-registration
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanGKulkarni authored Aug 8, 2024
2 parents 3114e50 + 3780463 commit c4d1378
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/push-to-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Push To Server

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
name: deploy on remote
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.DC_HOST }}
username: ${{ secrets.DC_USER }}
password: ${{ secrets.DC_PASS }}
script: |
cd ~/tpc_portal/tpc-frontend
git pull origin main
docker stop tpc_portal-frontend-1
docker rm tpc_portal-frontend-1
docker rmi tpc_portal-frontend || true
cd ..
docker compose up -d
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ FROM node:alpine

WORKDIR /usr/app

RUN npm install --global pm2

COPY ./package.json ./
COPY ./yarn.lock ./

RUN yarn install --frozen-lockfile

COPY ./ ./

RUN npm run build
RUN yarn build

USER node

CMD [ "pm2-runtime", "npm", "--", "start" ]
CMD [ "yarn", "start" ]

0 comments on commit c4d1378

Please sign in to comment.