Skip to content

Commit

Permalink
adjust Nepal CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Janderson Souza Matias authored and Janderson Souza Matias committed Nov 21, 2023
1 parent debff0e commit 105ab12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nepal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy NEPAL

on:
push:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
build:
name: Deploy to server
name: Deploy to nepal server
runs-on: ubuntu-latest
env:
DB_HOST: ${{ secrets.DB_HOST }}
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: npm install

- name: Install dependencies
- name: Run Migrations
run: npm run migration:run

- name: Copy public folder
Expand All @@ -37,7 +37,7 @@ jobs:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
source: "src,package.json,Dockerfile,docker-compose-np.yml"
source: "src,node_modules,build,package.json,Dockerfile,docker-compose-np.yml"
target: "/home/ubuntu/apps/coach-backend-np"

- name: executing remote ssh commands using ssh key
Expand Down
20 changes: 3 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
FROM node:16
FROM node:18

# Create app directory
# WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn

COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 3000
CMD [ "yarn", "start:dev" ]

CMD [ "node", "build/index.js" ]

0 comments on commit 105ab12

Please sign in to comment.