Want to deploy to DigitalOcean? Use the terraform and ansible files in this directory to deploy Bluflare.
- Install OpenTofu or Terraform
- Install Ansible
- Get a DigitalOcean API token with read/write access and save it in the
TF_VAR_DO_TOKENenvironment variable (both terraform and ansible will use this variable) - Create an SSH key on your local machine in the
~/.ssh/id_ed25519.pubfile (both terraform and ansible will use this file)
Make sure the DigitalOcean terraform provider is installed.
terraform -chdir=terraform initDepending if you have OpenTofu or Terraform, replace tofu with terraform in the commands below. This will provision the necessary cloud resources in DigitalOcean.
tofu -chdir=terraform applyUsing ansible and the following command will setup the host to run the Bluflare.
- To setup the host you need multiple environment variables set. Please refer to the .env.example file for more information.
- To pull the images you need to have
GHCR_USER(your GitHub username) andGHCR_TOKEN(your GitHub token) set in your environment. Please refer to the Github Container Registry documentation for more information to authenticate.
ansible-playbook -i ansible/inv.digitalocean.yaml ansible/setup.yamlUsing ansible and the following command will deploy the Bluflare (pull images and run docker compose).
ansible-playbook -i ansible/inv.digitalocean.yaml ansible/execute.yamlUsing terraform and the following command will teardown the cloud resources.
tofu -chdir=terraform destroy