Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 977 Bytes

README.md

File metadata and controls

40 lines (30 loc) · 977 Bytes

InvestPro IaC with ECS

Build Docker Images and Push to the ECR

  1. Configure your AWS Credentials:
aws configure   
  1. Login to the ECR:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 657608969216.dkr.ecr.us-east-1.amazonaws.com/invest-pro-api
  1. Build and Push the Docker Image:
export VERSION="0.0.2"
export REPOSITORY="657608969216.dkr.ecr.us-east-1.amazonaws.com/invest-pro-api"
docker build -t invest-pro-api:$VERSION .

docker tag invest-pro-api:$VERSION $REPOSITORY:$VERSION
docker tag invest-pro-api:$VERSION $REPOSITORY:latest

docker push "$REPOSITORY":"$VERSION"
docker push "$REPOSITORY":latest

SSH to the EC2 Instance

cd Projects
ssh -i "gbrotas-keypair.pem" [email protected]

Obtain SSL Certificate

sudo yum install -y nginx certbot python-certbot-nginx
sudo certbot certonly --nginx -d myportfolio-api.brottas.com