Skip to content

Commit

Permalink
docker ec2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajanan02 committed Jun 11, 2024
1 parent 31e6310 commit d88a475
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Deploy Node Application

on:
push:
branches:
Expand All @@ -11,7 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker Image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/institute-management-backend .
- name: Publish Docker Image
Expand All @@ -24,5 +25,4 @@ jobs:
- name: Pull Docker Image
run: docker pull ${{ secrets.DOCKER_USERNAME }}/institute-management-backend:latest
- name: Run Docker Container
run: docker run -d -p 5000:5000 --name institute-management-backend -e MONGO_URI=${{ secrets.MONGO_URI }} ${{ secrets.DOCKER_USERNAME }}/institute-management-backend

run: docker run -d -p 5000:5000 --name institute-management-backend -e MONGO_URI=${{ secrets.MONGO_URI }} ${{ secrets.DOCKER_USERNAME }}/institute-management-backend:latest

0 comments on commit d88a475

Please sign in to comment.