Simply copy and paste the following command line in your terminal to create your first Strapi project.
npx create-strapi-app my-project
All components, i.e., Strapi & MySQL, run on a single VM; hence it is ideal for getting started, exploring Strapi, or a sandbox scenario.
Azure ARM templates are a way to implement infrastructure as code in Azure. Infrastructure as code's benefits includes deployment automation, consistent and repeatable infrastructure, and agility.
This guide uses an ARM (Azure Resource Manager) template to deploy the required Azure resources and a bash script to configure and install Strapi in it. You can do this with minimal user intervention.
The template creates the following required resources in its own new Resource Group:
Strapi installation steps run using a bash script after the VM provisioning. The script is part of the repository that contains the ARM template.
The ARM template (JSON file) and the bash script are available on the GitHub repo.
|adminUsername||strapiadmin||Username for connecting (SSH) to the Azure VM|
|adminPasswordOrKey||$tr@p!@12345||Default password for the user|
A Strapi app called blog is created with the following defaults.
NOTE: This template has been deliberately created so that it requires the least possible inputs to get a working Strapi installation. Hence, many variables have been pre-defined as per minimum requirements. You can edit the ARM template if you wish to modify any variables, such as Azure VM size or password(s).
Running this Azure deployment as it is in Production is not recommended.
While it is not mandatory but a basic understanding of the following will help if you wish to customize this template or the script
Click the Deploy to Azure button below to load the template in Azure Portal. You may be prompted to sign in to Azure.
In the custom deployment page, click Create new and create a new Resource Group for this deployment.
Next, select your preferred Region and then click Review + create.
Ensure Validation passes , click Create to start the Azure resource deployment.
The deployment process will begin and take around 5-10 minutes. NOTE: If the deployment fails, delete the resource group completely and restart the deployment. Do not use the Redeploy feature.
You can also retrieve this & the Public IP address from the Overview section of the Azure VM.
You can modify the default values of the Azure infrastructure to your need. The following values could be changed (avoid changing other values, such as for networking and DNS, unless you are sure of the expected outcome):
After clicking Deploy to Azure, click Edit template.
Modify values as needed.
Continue with deployment.
The installation uses some default values for database username, password, port, database name, etc. As mentioned earlier in the article, one can modify them after the installation if needed.
Refer to the documentation for instructions.
This article demonstrates how to quickly bring up an Azure VM running Strapi using an ARM template or Infrastructure as Code approach.
Multi-cloud professional with over 17 years of technology experience, primarily in the Cloud Computing, Virtualization & Datacenter domains. Multi-cloud certified since 2013 and a Microsoft Certified Trainer since 2015.