Skip to content

Commit

Permalink
changed the port for deploying on AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadi38 committed Feb 13, 2024
1 parent 22436ab commit 173cad3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_TOKEN }}
- name: Set permissions for private key

run: |
echo "${{ env.EC2_SSH_KEY }}" > key.pem
chmod 400 key.pem
chmod 600 key.pem
- name: Pull Docker image
run: |
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker pull shadi38/node-app:4.0'
Expand All @@ -52,7 +53,7 @@ jobs:
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker rm node-app:4.0 || true'
- name: Run new container
run: |
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker run -d --name node-app -p 80:3000 shadi38/node-app:4.0'
ssh -o StrictHostKeyChecking=no -i key.pem [email protected] 'sudo docker run -d --name node-app -p 3000:3000 shadi38/node-app:4.0'
Expand Down

0 comments on commit 173cad3

Please sign in to comment.