Templates

Appwrite

11min

Appwrite is an open-source backend server for web and mobile applications that provides a set of APIs and tools for developers to easily build and manage their app's backend.

It includes features such as user authentication, database management, file storage, and more. Appwrite can be used with various programming languages and frameworks and can be deployed on-premises or in the cloud.

It also offers a user-friendly dashboard for managing your app's backend, making it a convenient solution for developers of all levels of experience.to build scalable and sophisticated commerce setups with low effort and great developer experience.

Infrastructure ownership

The Appwrite infrastructure will be provisioned on your own AWS account.

You retain full control over your infrastructure and data while getting all the benefits of infrastructure automation.

One-click Deploy

Click Deploy with Microtica below and follow the template steps to deploy your Appwrite on your AWS account.



What will be provisioned on AWS

Since Microtica deploys on your cloud account, you would expect nothing less than complete transparency of what resources are going to be provisioned.

Using the Appwrite template, you will create two components in the environment:

  • VPC — VPC, subnets and networking
  • EKS Cluster - Container infrastructure based on Kubernetes, application load balancer and persistent storage

Built-in environment variables

Below is a list of built-in environment variables provided in the Appwrite runtime.

Name

Description

Required

DatabasePassword

Password for the MariaDB database. The same password will be used as a token for the Appwrite Executor.

Yes

Custom environment variables

To simplify the initial setup, this template sets the default configuration for the Appwrite application. If you need to customize the configuration and use custom variables like _APP_SMTP_HOST, _APP_SMTP_PORT (see the full list of environment variables) you can to that in two ways.

Please note that the Appwrite template contains multiple containers, each with its own distinct set of supported environment variables. As such, when defining environment variables, it is crucial to ensure that they are specified for the appropriate container.

Configure environment variables from Microtica Console

To configure environment variable from Microtica Console you need to first define the variables in the schema.json file. The input properties defined here will become available in the Microtica Console. With this approach you get consistent configuration for the application as well as strong validation rules.

JSON


Next, to inject the environment variable in the application container runtime, just reference the variable using the {{ENV_VAR_NAME}} syntax.

YAML


Configure environment variables directly in the Kubernetes spec

To configure an environment variable directly in the Kubernetes spec you need to update the kube.config file.

Similar to the previous example, now provide the environment variable value directly in the spec.

YAML


Estimated AWS cost

The estimated cost of the AWS cloud depends on the configuration of the Appwrite infrastructure. Below is the cost estimation breakdown assuming the resources are running all the time:

  • EKS Cluster - $70/month
  • Application Load Balancer - $17/month
  • 2 x t3.large EC2 instances - $60/month

Total cost per month with this minimal configuration is approximately $150/month.

Optimize AWS cost

To save costs while using Appwrite in a non-production environment, consider running it from Monday to Friday, 8 hours per day. This schedule can help you achieve at least a 65% reduction in your cloud expenses.

In the Resources or Cost Dashboard, create a Saving Schedule to implement these cost-saving measures.

Document image




Known issues

  • Usage stats are not available
  • Cannot add alternative custom domains
    • Temporary solution: add additional ingress resource in .microtica/kube.config