Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavJFT authored Sep 12, 2024
1 parent af1cc48 commit 0c73f48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Chatbot Application
on:
push:
branches:
- main # the branch trigger this workflow
- main

jobs:
deploy:
Expand All @@ -16,9 +16,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
Expand All @@ -31,9 +28,9 @@ jobs:
- name: Build Docker images
run: |
cd main_server
sudo docker build -t chatbotmain .
sudo docker build --no-cache -t chatbotmain:${{ github.sha }} .
cd ../processing_server
sudo docker build -t chatbotprocess .
sudo docker build --no-cache -t chatbotprocess:${{ github.sha }} .
- name: Stop and remove running containers
run: |
Expand Down Expand Up @@ -64,6 +61,9 @@ jobs:
sudo docker run -it --rm --network chatbotnetwork --name rabbitmq-server \
-d -p 5672:5672 -p 15672:15672 rabbitmq:3.13-management
sudo docker run --network chatbotnetwork --name mysql -e MYSQL_ROOT_PASSWORD=12345678 -d mysql:latest
# Run newly built containers
sudo docker run --network chatbotnetwork --name chatbotmain -d chatbotmain:${{ github.sha }}
sudo docker run --network chatbotnetwork --name chatbotprocess -d chatbotprocess:${{ github.sha }}
- name: Verify running containers
run: |
Expand Down

0 comments on commit 0c73f48

Please sign in to comment.