Skip to content

Commit

Permalink
Update search port
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeineb2001 authored Dec 1, 2024
1 parent 5589bf7 commit d6a580e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/search-service-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Verify if the correct JAR file exists
run: |
ls service-search-1.0.0-SNAPSHOT.jar || (echo "JAR file not found!" && exit 1)
ls target/service-search-*.jar || (echo "JAR file not found!" && exit 1)
- name: Add Server to Known Hosts
run: |
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Transfer JAR to VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp ./service-search-1.0.0-SNAPSHOT.jar \
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp ./target/service-search-*.jar \
${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }}:~/service-search/service-search.jar
- name: Verify if the JAR file exists on the VPS
Expand All @@ -83,13 +83,13 @@ jobs:
echo "Starting Spring Boot service..."
cd ~/service-search
nohup java -jar service-search.jar --server.port=8082 > service-search.log 2>&1 &
nohup java -jar service-search.jar --server.port=8089 > service-search.log 2>&1 &
echo "Spring Boot service deployed successfully!"
sleep 30
echo "Performing health check..."
curl -X 'GET' 'http://localhost:8082/products' -H 'accept: /' || (echo "Service health check failed!" && exit 1)
curl -X 'GET' 'http://localhost:8082/actuator/health' -H 'accept: application/json' || (echo "Service health check failed!" && exit 1)
echo "Service deployed and healthy!"
Expand Down

0 comments on commit d6a580e

Please sign in to comment.