Azure Container Instance
Azure Container Instances (ACI) is a simple and efficient way to run containers in the cloud. This document guides you through launching an ACI instance and running an Appsmith container. The data persists in Azure Storage Account File Share.
Azure only supports CIFS file shares and doesn't support NFS file shares.
Prerequisites
Before launching an ACI instance, you need to have an Azure subscription and have the Azure CLI installed on your machine.
- Azure Subscription - If you don't have an Azure subscription, you can sign up for a free trial
- Azure CLI
Configure variables
Update the following values starting with 'my' where necessary, and enter them in your shell/terminal.
resourceGroupName="myResourceGroup"
aciName="myAppsmithACI"
storageAccountName="mystorageaccount$RANDOM"
aciLocation="southindia"
fileShareName="myFileShareName"
dnsNameLabel="myDNSLabel"
Create a resource group (optional)
You can skip this step if you want to use an existing resource group.
az group create --name $resourceGroupName --location $aciLocation
Create a storage account (optional)
You can skip this step if you want to use an existing storage account.
az storage account create --resource-group $resourceGroupName --name $storageAccountName --location $aciLocation --sku Standard_LRS
Get the storage account key
storageAccountKey=$(az storage account keys list --resource-group $resourceGroupName --account-name $storageAccountName --query "[0].value" --output tsv)
Create a file share
az storage share create --name $fileShareName --account-name $storageAccountName --account-key $storageAccountKey
Create Appsmith ACI
- Community Edition
- Business Edition
az container create \
--resource-group $resourceGroupName \
--name $aciName \
--image appsmith/appsmith-ce \
--ip-address public \
--dns-name-label $dnsNameLabel \
--ports 80 443\
--cpu 2 \
--memory 4 \
--azure-file-volume-account-name $storageAccountName \
--azure-file-volume-account-key $storageAccountKey \
--azure-file-volume-share-name $fileShareName \
--azure-file-volume-mount-path "/appsmith-stacks/"
az container create \
--resource-group $resourceGroupName \
--name $aciName \
--image appsmith/appsmith-ee \
--ip-address public \
--dns-name-label $dnsNameLabel \
--ports 80 443 \
--cpu 2 \
--memory 4 \
--azure-file-volume-account-name $storageAccountName \
--azure-file-volume-account-key $storageAccountKey \
--azure-file-volume-share-name $fileShareName \
--azure-file-volume-mount-path "/appsmith-stacks/" \
You now have your Appsmith application running in the cloud with Azure Container Instances. If you encounter any errors along the way, follow the troubleshooting guide for assistance.
Container logs
To troubleshoot a container or the application it runs or view its output, start by accessing the logs of the container instance using the az container logs command.
az container logs --resource-group myResourceGroup --name mycontainer
Update Appsmith
Create a backup of the Appsmith instance before performing an update. See How to create a backup.
- Navigate to the ACI on the Azure Portal
- Click the ACI running Appsmith
- Click the Restart button
- Wait until the ACI restarts with the latest Appsmith release.
If you have updated your Appsmith instance and face any issues, you can roll back the changes and restore the Appsmith instance from a backup archive.
Troubleshooting
If there are any errors during this process, follow the guide on debugging deployment errors. If there are still issues, please contact support@appsmith.com or join the Appsmith Discord Server to speak to the Appsmith team directly.