From 105ab12d381a3628edc3989cd1f93d3e0280effb Mon Sep 17 00:00:00 2001 From: Janderson Souza Matias Date: Tue, 21 Nov 2023 12:41:06 -0300 Subject: [PATCH] adjust Nepal CI --- .github/workflows/nepal.yml | 8 ++++---- Dockerfile | 20 +++----------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/nepal.yml b/.github/workflows/nepal.yml index 92e4a8f..6757fa4 100644 --- a/.github/workflows/nepal.yml +++ b/.github/workflows/nepal.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Deploy NEPAL on: push: @@ -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 }} @@ -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 @@ -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 diff --git a/Dockerfile b/Dockerfile index c0861c9..31b9762 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ]