Skip to content

Commit

Permalink
ef
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesGresset committed Dec 18, 2024
1 parent 43f9da0 commit 0ca9c3a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,34 @@ jobs:
git add .
git commit -m "Update from Back-End (Automation)"
git push origin main
deployVPSCA:

runs-on: ubuntu-latest

name: Deploy to VPS CA

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.X'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Deploy to VPS CA
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.VPS_CA_SSH }}
ARGS: "-rlgoDzvc --delete"
REMOTE_HOST: ${{ secrets.VPS_CA_HOST }}
REMOTE_USER: ${{ secrets.VPS_CA_USERNAME }}
TARGET: ${{ secrets.VPS_CA_TARGET }}
SCRIPT_AFTER: '~/restartBackend.sh'
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 4000
CMD ["npm", "run", "start:prod"]
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.8"
services:
backend:
container_name: backend
build: .
ports:
- "4000:4000"
volumes:
- .:/app
- /app/node_modules
command: npm run start:prod

0 comments on commit 0ca9c3a

Please sign in to comment.