This repository demonstrates how to deploy Strapi, an open-source headless CMS, on Azure App Service. The sample includes step-by-step instructions, pre-configured code, and an ARM template to automate the deployment process.
This repository contains all the necessary configuration files and instructions to deploy a production-ready Strapi instance on Azure App Service. It offers a quick-start guide to get your Strapi application up and running in the Azure with minimal setup.
- Azure App Service Integration: Run your Strapi instance directly on Azure.
- ARM Template: Automate the creation of your Azure infrastructure (Resource Group, App Service Plan, and Web App).
- Scalability: Leverage Azure's scalable platform to handle production workloads.
- Customizable Configuration: Easily modify settings for environment variables and database connections to suit your needs.
The solution is structured as a Node.js application hosted on Azure App Service. Key components include:
- Strapi Backend: A customizable headless CMS powering your content management needs.
- Azure App Service: Provides the hosting environment for the application.
- ARM Template: Automates the deployment of essential Azure resources, streamlining the setup process.
- Configuration Files: Manage environment settings, deployment scripts, and resource definitions.
Before proceeding, make sure you have the following:
- Git
- An Azure account with necessary permissions to create App Services.
- Azure CLI installed (optional but recommended)
Follow these steps to deploy the Strapi application on Azure:
-
Clone the Repository
Clone this repository to your local machine:git clone https://github.com/Azure-Samples/strapi-on-appservice-sample.git cd strapi-on-appservice-sample -
Log in to Azure
Use the Azure CLI to log in to your Azure account:az login
-
Update Deployment Parameters
Open theazure-quickstart-template/armtemplate.parameters.jsonfile and update the parameters. -
Deploy the ARM Template
Run the following command to deploy the ARM template:az deployment group create \ --resource-group "<your-resource-group-name>" \ --name "<your-deployment-name>" \ --template-file "azure-quickstart-template/armtemplate.json" \ --parameters "azure-quickstart-template/armtemplate.parameters.json" -
Verify Deployment
Once the deployment is complete, navigate to the Azure Portal to verify that the resources (App Service, Database, etc.) have been created successfully.
Alternatively, you can use the following button for a quick deployment:
If you encounter any issues or need assistance, refer to the following resources: