Just testing out dokku on a digital ocean droplet... using terraform
This project uses terraform to provision a virtual machine and install Dokkuas a PaaS host. I chose to use DigitalOcean for their cheap droplets/VMs and GoogleCloud’s DNS for it’s resilience. This is by no means the only viable provider schema; I consciously used two different providers to play with a frankencloud model.
You will notice several references to credentials, most of which are specific to the cloud provider being used (ie. GCP, Digitalocean). See terraform’s documentation for help on accessing and working with your provider of choice.
terraform.tfvars
file to override some of the defaults set in variables.tf
ssh_id:
MD5 fingerprint of ssh key on DigitalOceanssh_prikey:
Specify the path to the ssh private key (optional)domain:
Your TLD or subdomain thereofemail:
Your email, for Let’s Encryptregion:
The DigitalOcean region to deploy into (optional)size:
The RAM of the droplet (optional)appname:
name for app to be deployed (optional)gitname:
source repo for app to be deployed (optional)~/.creds/do_token
~/.creds/gcp_credentials.json
~/.creds/gcp_project_id
After cloning this repository, initialize terraform plugins like so:
terraform init
You will have to do these each time you add new providers to the .tf
files.
Simply type:
terraform plan
to see what resources will be deployed.
This command sets it all in motion:
terraform apply
This command takes it all down. No more charges to your account :)
terrafom destroy