diff --git a/.github/workflows/cicd-workflow.yml b/.github/workflows/cicd-workflow.yml index 774a406d..462bb788 100644 --- a/.github/workflows/cicd-workflow.yml +++ b/.github/workflows/cicd-workflow.yml @@ -13,17 +13,17 @@ jobs: - name: Login to docker hub run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - name: Build docker image - run: docker build -t integrationninjas/nodejs-app . + run: docker build -t karthi2611/nodejs-githubaction . - name: Publish image to docker hub - run: docker push integrationninjas/nodejs-app:latest + run: docker push karthi2611/nodejs-githubaction:latest - deploy: - needs: build - runs-on: [aws-ec2] - steps: - - name: Pull image from docker hub - run: docker pull integrationninjas/nodejs-app:latest - - name: Delete old container - run: docker rm -f nodejs-app-container - - name: Run docker container - run: docker run -d -p 5000:5000 --name nodejs-app-container integrationninjas/nodejs-app + # deploy: + # needs: build + # runs-on: [aws-ec2] + # steps: + # - name: Pull image from docker hub + # run: docker pull integrationninjas/nodejs-app:latest + # - name: Delete old container + # run: docker rm -f nodejs-app-container + # - name: Run docker container + # run: docker run -d -p 5000:5000 --name nodejs-app-container integrationninjas/nodejs-app diff --git a/Dockerfile b/Dockerfile index 5953f1f5..8fc3e942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ +#Dockerfile FROM node:16.20.1 WORKDIR /app COPY package.json ./ RUN npm install COPY . . EXPOSE 5000 -CMD ["npm","run","start"] \ No newline at end of file +CMD ["npm","run","start"] + + diff --git a/README.md b/README.md index 00aeaf62..cdfc09c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Nodejs app with rest and graphql example -An example of GraphQL queries/mutations with Node and Express js. +An example of GraphQL queries/mutations with Node and Express js... With GraphQL, clients can specify exactly what data they need, and the server responds with only that data, reducing the amount of data transferred over the network.