Deploy an Existing Strapi App
When you deploy infrastructure with the Strapi Serverless template, you have the possibility to create a new Strapi application in your Git repository or select an existing Strapi application if you already have one.
By using Git for your Strapi projects, the process of moving content types from one environment to another is much easier and deployments are more predictable.
Review your database configuration
Before deploying the Strapi template, please make sure that you have a correct database configuration. This is important to make it right because the template provides some predefined environment variables in the app runtime that can be used in the Strapi project.
Here is an example of a working database configuration:
Deploy your app using the Strapi Serverless Template.
1. Import Git Repository
As a first step, you need to connect a Git account (GitHub, Bitbucket, or GitLab). If you already have a Git account connected to Microtica, you can choose it from the list. Select the repository with your existing project, click Import, and every Git push will be deployed automatically in Microtica.
2. Configure Template
The second step is to configure the environment variables for this template. Variables provide a way to customize a template to meet your requirements. For example, here is where you configure the scaling parameters for your Strapi app. You can scale your app vertically and horizontally. For vertical scaling, update the CPU and Memory configuration in this section. For horizontal scaling, update the number of desired replicas in the same section.
In this section you can also choose the database client - sqlite is the default option.
You can update the configuration later as well.
3. Configure Environment
After configuring the template, you will need to select an environment where the template will reside. Environments are a great way to separate your development and production applications. If you need to create a new environment, you can enter the environment name and description and click the Select button. You can also choose an existing environment if you have created one previously.
Next, you need to configure the target AWS account where your Strapi infrastructure will be provisioned. Here is a quick guide on How to Connect your AWS account.
Once your AWS account is connected and configured in the environment, click on the Deploy button to trigger the deployment.
It takes up to 10 mins to create a live Strapi environment.
You can follow the pipeline logs inline, and monitor your deployment in real-time.
Once the template deployment finishes, you can find the access URL in Environment > Infrastructure > Strapi (Strapi is the AppName we provided in the template configuration step), under Resource outputs, the AccessUrl parameter. Copy-paste it in the browser to see your Strapi Demo app.