mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-15 02:50:10 +01:00
40d55f4042
Added necessary deployment steps. Modified not supported Ubuntu version with the latest LTS option. Co-authored-by: thealice <thealice@wonderland.com>
52 lines
1.0 KiB
HCL
52 lines
1.0 KiB
HCL
terraform {
|
|
required_version = ">= 1.0.0"
|
|
|
|
required_providers {
|
|
digitalocean = {
|
|
source = "digitalocean/digitalocean"
|
|
version = "~> 2.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "digitalocean" {
|
|
# Add your DigitalOcean API token here
|
|
token = "DigitalOcean API token"
|
|
}
|
|
|
|
|
|
resource "digitalocean_droplet" "anything_llm_instance" {
|
|
image = "ubuntu-24-04-x64"
|
|
name = "anything-llm-instance"
|
|
region = "nyc3"
|
|
size = "s-2vcpu-2gb"
|
|
|
|
user_data = templatefile("user_data.tp1", {
|
|
env_content = local.formatted_env_content
|
|
})
|
|
}
|
|
|
|
locals {
|
|
env_content = file("../../../docker/.env")
|
|
formatted_env_content = join("\n", [
|
|
for line in split("\n", local.env_content) :
|
|
line
|
|
if !(
|
|
(
|
|
substr(line, 0, 1) == "#"
|
|
) ||
|
|
(
|
|
substr(line, 0, 3) == "UID"
|
|
) ||
|
|
(
|
|
substr(line, 0, 3) == "GID"
|
|
) ||
|
|
(
|
|
substr(line, 0, 11) == "CLOUD_BUILD"
|
|
) ||
|
|
(
|
|
line == ""
|
|
)
|
|
)
|
|
])
|
|
} |