website logo
Sign Up PricingApp Templates
⌘K
🚀Getting started
Create an account in Microtica
Create an application from template
Import an existing application
Scaling Applications in Microtica
Assign a Custom Domain
⏰Changelog
📚Ready-to-use Templates
Strapi Serverless
Medusa Server
Appwrite
SPA on CloudFront
Amazon EKS
Node.js
n8n Workflow Automation
Next.js
🤖Migrate to Microtica
Migrate from Heroku to AWS
🚦Pipelines
Pipeline Syntax
Steps
Stages
Artifacts
Variables
↩️Automated Rollbacks
🔗Integrations
Connect an AWS account
Connect an Existing Kubernetes Cluster
Connect a Container Registry
⚙️Project Settings
Manage teammates
Manage pricing plan and billing
Docs powered by archbee 

Deploy an Existing Strapi App

9min

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.

Deploy Strapi on AWS Now

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
|
module.exports = ({ env }) => {
  const connections = {
    sqlite: {
      connection: {
        client: 'sqlite',
        connection: {
          filename: env('DATABASE_FILENAME', '.tmp/data.db'),
        },
        useNullAsDefault: true,
      }
    },
    mysql: {
      connection: {
        client: 'mysql',
        connection: {
          host: env('DATABASE_HOST', 'localhost'),
          port: env.int('DATABASE_PORT', 3306),
          database: env('DATABASE_NAME', 'strapi'),
          user: env('DATABASE_USERNAME', 'strapi'),
          password: env('DATABASE_PASSWORD', 'strapi')
        },
        debug: false,
      }
    },
    postgres: {
      connection: {
        client: 'postgres',
        connection: {
          host: env('DATABASE_HOST', 'localhost'),
          port: env.int('DATABASE_PORT', 3306),
          database: env('DATABASE_NAME', 'strapi'),
          user: env('DATABASE_USERNAME', 'strapi'),
          password: env('DATABASE_PASSWORD', 'strapi')
        },
        debug: false,
      }
    }
  };

  return connections[env('DATABASE_CLIENT')];
};


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




Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Deploy a New Strapi App
NEXT
Configure a Custom Domain
Docs powered by archbee 
TABLE OF CONTENTS
Review your database configuration
Deploy your app using the Strapi Serverless Template.
1. Import Git Repository
2. Configure Template
3. Configure Environment
4. Deploy