From 40d55f40422fd3fe6759a61b97388467b4ba0ed8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Ekin=20Y=C4=B1ld=C4=B1r=C4=B1m?=
 <101638632+beyildirim@users.noreply.github.com>
Date: Mon, 15 Jul 2024 06:07:17 +0300
Subject: [PATCH] Digital Ocean Terraform Patches (#1866)

Added necessary deployment steps. Modified not supported Ubuntu version with the latest LTS option.

Co-authored-by: thealice <thealice@wonderland.com>
---
 cloud-deployments/digitalocean/terraform/DEPLOY.md | 10 ++++++----
 cloud-deployments/digitalocean/terraform/main.tf   |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cloud-deployments/digitalocean/terraform/DEPLOY.md b/cloud-deployments/digitalocean/terraform/DEPLOY.md
index 1877abc2e..7baf5d401 100644
--- a/cloud-deployments/digitalocean/terraform/DEPLOY.md
+++ b/cloud-deployments/digitalocean/terraform/DEPLOY.md
@@ -12,16 +12,18 @@ The output of this Terraform configuration will be:
   - Follow the instructions in the [official Terraform documentation](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) for your operating system.
 
 ## How to deploy on DigitalOcean
-Open your terminal and navigate to the `digitalocean/terraform` folder
-1. Replace the token value in the provider "digitalocean" block in main.tf with your DigitalOcean API token.
-2. Run the following commands to initialize Terraform, review the infrastructure changes, and apply them:
+Open your terminal and navigate to the `docker` folder
+1. Create a `.env` file by cloning the `.env.example`. 
+2. Navigate to `digitalocean/terraform` folder.
+3. Replace the token value in the provider "digitalocean" block in main.tf with your DigitalOcean API token.
+4. Run the following commands to initialize Terraform, review the infrastructure changes, and apply them:
     ```
     terraform init  
     terraform plan  
     terraform apply  
     ```
 Confirm the changes by typing yes when prompted.
-4. Once the deployment is complete, Terraform will output the public IP address of your droplet. You can access your application using this IP address.
+5. Once the deployment is complete, Terraform will output the public IP address of your droplet. You can access your application using this IP address.
 
 ## How to deploy on DigitalOcean
 To delete the resources created by Terraform, run the following command in the terminal:
diff --git a/cloud-deployments/digitalocean/terraform/main.tf b/cloud-deployments/digitalocean/terraform/main.tf
index 331d254e3..7a76f57b2 100644
--- a/cloud-deployments/digitalocean/terraform/main.tf
+++ b/cloud-deployments/digitalocean/terraform/main.tf
@@ -16,7 +16,7 @@ provider "digitalocean" {
 
   
 resource "digitalocean_droplet" "anything_llm_instance" {  
-  image  = "ubuntu-22-10-x64"  
+  image  = "ubuntu-24-04-x64"  
   name   = "anything-llm-instance"  
   region = "nyc3"  
   size   = "s-2vcpu-2gb"