diff --git a/.github/workflows/gradle-prod.yml b/.github/workflows/gradle-prod.yml index 65289e5..ac8f58c 100644 --- a/.github/workflows/gradle-prod.yml +++ b/.github/workflows/gradle-prod.yml @@ -117,5 +117,12 @@ jobs: # OSRM 실행 - name: Run OSRM server - run: cd /home/ubuntu/osrm ; sudo docker run -t -i -p 5000:5000 -v "${PWD}:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/south-korea-latest.osrm - shell: bash + uses: appleboy/ssh-action@master + with: + key: ${{ secrets.EC2_KEY_PROD }} + host: ${{ secrets.EC2_HOST_PROD }} + username: ${{ secrets.EC2_USER_PROD }} + script: | + sudo fuser -k -n tcp 5000 + sleep 15 + sudo docker run -i -p 5000:5000 -v "/home/ubuntu/osrm:/data" osrm/osrm-backend osrm-routed --algorithm mld /data/south-korea-latest.osrm