Skip to content

Commit

Permalink
Merge pull request #6 from FPirazz/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
massone99 authored Mar 7, 2024
2 parents 4ae8582 + 0ec9c8f commit 91d5302
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/deployApp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Application to AWS EC2 Instance
on:
push:
branches:
- prepDeploy
- main

jobs:
Deploy:
name: Deploy to EC2
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build & Deploy
env:
PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOSTNAME: ${{secrets.SSH_HOST}}
USER_NAME: ${{secrets.USER_NAME}}

run: |
echo "$PRIVATE_KEY" > ./private_key && chmod 600 ./private_key
cat ./private_key
ssh -o StrictHostKeyChecking=no -i ./private_key ${USER_NAME}@${HOSTNAME} '
# Now we have got the access of EC2 and we will start the deploy .
kubectl delete --all svc
kubectl delete --all deploy
kubectl delete --all pods
sudo docker container delete vue-app
minikube start
cd my-dashboard/
sudo docker pull leomarzoli/traffic_management_system:latest
kubectl apply -f intersection-agents-deployment.yaml,intersection-agents-service.yaml,spring-db-app-deployment.yaml,spring-db-app-service.yaml,user-db-deployment.yaml,user-db-service.yaml
docker run -it --rm --add-host=host.docker.internal:host-gateway -d -p 8080:80 --name vue-app leomarzoli/traffic_management_system:latest
minikube tunnel -c
'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Project for both SPA and SPE


Link to the [documentation (DOC).](https://marzolileo.github.io/Traffic-Management/)
Link to the [documentation (DOC).](https://fpirazz.github.io/Traffic-Management/)

0 comments on commit 91d5302

Please sign in to comment.