Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.52 KB

readme.md

File metadata and controls

46 lines (33 loc) · 1.52 KB

Static Badge Static Badge Static Badge Static Badge

Static Badge Static Badge Static Badge

DigitalOcean

Terraform na DigitalOcean provisionando um droplet com docker-compose usando um servidor nginx com suporte a PHP-FPM e Node.js.

ssh

ssh-keygen -t rsa -C "[email protected]" -f ./tokens/tf-digitalocean-exemplo
chmod 600 ./tokens/tf-digitalocean-exemplo

terraform

terraform init
terraform apply -auto-approve

ansible

ansible-playbook ./ansible/playbook.yml -i ./ansible/hosts --private-key=./tokens/tf-digitalocean-exemplo

acessar droplet via ssh

ssh [email protected] -i ./tokens/tf-digitalocean-exemplo

Excluir infra

terraform destroy -auto-approve
rm -f ./tokens/tf-digitalocean-exemplo ./tokens/tf-digitalocean-exemplo.pub
rm -rf .terraform && rm terraform.tfstate && rm terraform.tfstate.backup && rm .terraform.lock.hcl