Skip to content

GabrielBrotas/api-terraform-aws-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published