LibreChatAzureDeployment icon indicating copy to clipboard operation
LibreChatAzureDeployment copied to clipboard

customizing librechat.yaml for advanced configuration

Open Sander-OS opened this issue 1 year ago • 2 comments

Hi @thunderbug1 , I really like your terraform deployment. Thanks for sharing. I was wondering if you can point me out how to configure the webapp using the librechat.yaml? I want to be able to configure TTS en STT and assistants for example.

Thanks very much!

Sander-OS avatar Jun 11 '24 18:06 Sander-OS

I would like to learn the same thing!

ByteBrewerJB avatar Aug 02 '24 11:08 ByteBrewerJB

  1. ./config/librechat.yaml <- your YAML config

  2. Comment out all Azure OpenAI related app settings in azurerm_linux_web_app.

  3. ./webapps.tf:

resource "azurerm_storage_account" "librechatwebapp" {
  name                     = "librechatapp${random_string.random_postfix.result}"
  resource_group_name      = azurerm_resource_group.this.name
  location                 = azurerm_resource_group.this.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_storage_share" "librechatwebapp" {
  name                 = "librechatapp"
  storage_account_name = azurerm_storage_account.librechatwebapp.name

  quota = 1
}

resource "azurerm_storage_share_file" "librechat_yaml" {
  name             = "librechat.yaml"
  storage_share_id = azurerm_storage_share.librechatwebapp.id
  source           = "config/librechat.yaml"
  content_md5      = filemd5("config/librechat.yaml")
}

resource "azurerm_linux_web_app" "librechat" {
  # ..

  storage_account {
    name         = azurerm_storage_account.librechatwebapp.name
    account_name = azurerm_storage_account.librechatwebapp.name
    access_key   = azurerm_storage_account.librechatwebapp.primary_access_key
    share_name   = azurerm_storage_share.librechatwebapp.name
    mount_path   = "/home/site/wwwroot/config"
    type         = "AzureFiles"
  }

  app_settings = {
    CONFIG_PATH = "/home/site/wwwroot/config/librechat.yaml"

    WEBSITES_ENABLE_APP_SERVICE_STORAGE = true
  }
}

rubenaster avatar Jan 18 '25 22:01 rubenaster