Skip to content

Commit

Permalink
corr: criando .env apos copiar o codigo
Browse files Browse the repository at this point in the history
  • Loading branch information
iagocpv committed Nov 4, 2024
1 parent 86ac8dd commit 6a35afd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deployEC2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ jobs:
- name: Create target directory on AWS instance
run: |
ssh ${{ env.SSH_OPTIONS }} 'mkdir -p /home/ubuntu/tupan-back/'
ssh ${{ env.SSH_OPTIONS }} 'mkdir -p /home/ubuntu/tupan-back/'
- name: Transfer code to AWS instance
run: |
rsync -av --delete --exclude='.git' --exclude='.github' --exclude='.husky' -e "ssh -o StrictHostKeyChecking=no -i key.pem" --rsync-path="sudo rsync" ./ ubuntu@98.80.44.121:/home/ubuntu/tupan-back
- name: Create .env file
run: |
echo "DB_USER=${{ secrets.DB_USERNAME }}" >> .env
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
echo "DB_NAME=${{ secrets.DB_NAME }}" >> .env
echo "DB_HOST=${{ secrets.DB_HOST }}" >> .env
echo "DB_PORT=${{ secrets.DB_PORT }}" >> .env
- name: Transfer code to AWS instance
run: |
rsync -av --delete --exclude='.git' --exclude='.github' --exclude='.husky' -e "ssh -o StrictHostKeyChecking=no -i key.pem" --rsync-path="sudo rsync" ./ ubuntu@98.80.44.121:/home/ubuntu/tupan-back
echo "DB_PORT=${{ secrets.DB_PORT }}" >> .env
- name: Run Docker Compose
run: |
ssh ${{ env.SSH_OPTIONS }} 'cd /home/ubuntu/tupan-back/ && sudo docker-compose up -d'
Expand Down

0 comments on commit 6a35afd

Please sign in to comment.