Templates
Strapi Serverless

Deploy an Existing Strapi App

7min

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:

config/database.js
ļ»æ

Deploy your app using theĀ Strapi Serverless Template.

Select Strapi Serverless template
Select 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.

Import your Git repository
Import your Git repository
ļ»æ

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.

Configure the template
Configure the template
ļ»æ

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.

4. DeployĀ 

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.

Strapi Template AccessUrl
Strapi Template AccessUrl
ļ»æ

ļ»æ