![]() Open the Azure Cloud Shell and log into the mysql CLI:Ĭreate a database for Strapi to use CREATE DATABASE strapi then close the Cloud Shell. Navigate to Overview and copy Server name and Server admin login name. Set Allow access to Azure services to Yes and click Save. Navigate to the MySQL resource then Settings - Connection security. Create new application settings for the Storage account, storage account key and container name (these will become the environment variables available to Strapi) and click Save.Navigate to the Web App you created and go to Settings - Configuration.Navigate to Security + networking - Access keys, copy the Storage account name and key1.Create a new Container, provide a Name, strapi-uploads, and set Public access level to Blob, then click Create.Navigate to the Storage Account resource, then Data storage - Containers.Once all the resources are created, you will need to get the connection information for the MySQL and Storage account to the Web App, as well as configure the resources for use. Enter a username and password for the Administrator account, click Review + create then Create.Compute + storage - Select an appropriate scale for your requirements (Basic is adequate for many Strapi workloads).Location - Select an appropriate region.Data source - None (unless you're wanting to import from a backup).Select Single server for the service type. Navigate back to the Resource Group and click Create then search for Azure Database for MySQL and click Create. Redundancy - Select the appropriate level of redundancy for your files. ![]() Navigate back to the Resource Group and click Create then search for Storage account and click Create.Įnsure the Subscription and Resource Group are correct, then provide the following configuration for the storage account: Use the App Service Plan to select the appropriate Sku and size for the level of scale your app will need (refer to the Azure docs for more information on the various Sku and sizes). Navigate to the Resource Group once it's created, click Create resources.Įnsure the Subscription and Resource Group are correct, then provide the following configuration for the app: Provide a name for your Resource Group, my-strapi-app, and select a region. In this section we'll use the Azure Portal to create the required resources to host Strapi.Ĭlick Create a resource and search for Resource group from the provided search box. Creating Resources via the Azure Portal There are three resources in Azure that are required to run Strapi in a PaaS model, AppService to host the Strapi web application, Storage to store images/uploaded assets, and a database, Azure has managed MySQL and Postgres to choose from (for this tutorial, we'll use MySQL, but the steps are the same for Postgres). When Strapi is running in a PaaS hosting model, a custom storage provider will be required to avoid the transient disk of the PaaS model, which is covered towards the end.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |