Skip to content

richardoliveira/deploy-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POC PARA AUTOMATIZAÇÃO DE DEPLOY AWS EC2 (NodeJS + Traefik)

  • Instalar aws-cli
  $ sudo apt install awscli
  • Instalar docker-machine
  $ base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo mv /tmp/docker-machine /usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine
  • Configurar ambiente para usar aws-cli (Necessário informar AWS Access KEY, AWS Secret Key e a região que a instancia irá usar como padrão)
  $ aws configure 
  • Criar uma instancia EC2 via terminal
  $ docker-machine create --driver amazonec2 <nome da instancia a ser criada>
  • Apontar docker-machine para servidor criado
  $ eval $(docker-machine env <nome da instancia criada>) 
  • Subir o conteiner
  $ docker-compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d --remove-orphans --force-recreate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published