Merge branch 'multi-tenancy-1' into develop-inflection #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name: Reancare Deployment | |
# on: | |
# push: | |
# branches: | |
# - [] | |
# jobs: | |
# deploy: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# - name: Install AWS CLI | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y awscli | |
# - name: Configure AWS credentials | |
# uses: aws-actions/configure-aws-credentials@v2 | |
# with: | |
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# aws-region: ap-south-1 | |
# - name: Login to Amazon ECR | |
# run: aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 443751504066.dkr.ecr.ap-south-1.amazonaws.com | |
# - name: Build Docker image | |
# run: | | |
# docker build -t 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }} . | |
# docker push 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }} | |
# # - name: Download private key from S3 | |
# # run: | | |
# # aws s3 cp s3://reancare-configs/reancare-service/rean-service-key.pem ./rean-service-key.pem | |
# # env: | |
# # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# - name: SSH into EC2 instance | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{ secrets.EC2_HOST }} | |
# username: ${{ secrets.EC2_USERNAME }} | |
# key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# port: ${{ secrets.SSH_PORT }} | |
# script: | | |
# docker stop reancare-container || true | |
# docker rm reancare-container || true | |
# docker pull 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }} | |
# docker run -d -p 7272:7272 --network host --name reancare-container 443751504066.dkr.ecr.ap-south-1.amazonaws.com/reancare:${{ github.sha }} |