Skip to content

Commit

Permalink
cicd added
Browse files Browse the repository at this point in the history
  • Loading branch information
JunaidARahat committed Jan 28, 2024
1 parent c0b754f commit bc1d30d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ jobs:
run: |
docker pull ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
- name: Stop and remove container if running
run: |
docker ps -q --filter "name=cnncls" | grep -q . && docker stop cnncls && docker rm -fv cnncls
# - name: Stop and remove container if running
# run: |
# docker ps -q --filter "name=cnncls" | grep -q . && docker stop cnncls && docker rm -fv cnncls

- name: Run Docker Image to serve users
run: |
docker run -d -p 8080:8080 --name=cnncls -e 'AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}' -e 'AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}' -e 'AWS_REGION=${{ secrets.AWS_REGION }}' ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
docker run -d -p 8080:8080 --name=mlproject -e 'AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}' -e 'AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}' -e 'AWS_REGION=${{ secrets.AWS_REGION }}' ${{secrets.AWS_ECR_LOGIN_URI}}/${{ secrets.ECR_REPOSITORY_NAME }}:latest
- name: Clean previous images and containers
run: |
docker system prune -f

0 comments on commit bc1d30d

Please sign in to comment.