Simply copy and paste the following command line in your terminal to create your first Strapi project.
npx create-strapi-app
my-project
If you are new to building with Strapi, you may wonder how to handle migration across all environments for development, production, and testing. This article will help you decide which platform will be best for deploying your production app.
Strapi is an open-source headless content management system (CMS) built to provide ease while developing APIs with different features and working with all frontend GraphQL enabled frameworks. With Strapi, you can create content types, handle users, and manage images and audio using the media library.
You are required to host and communicate with your API on a live server. This article will focus on the different Strapi environments, what to consider before picking a deployment option, and their pros and cons.
Environment variables are provided to be used in Config files. Instead of writing the credentials across all config files, they are defined in a .env
file to configure development, production, and test environments.
Your project is in the Development environment when it is still being worked on locally. This is indicated in the structure and config; it is in the production environment once deployed.
The state of your environment affects the availability of certain features like the content-type builder. Watch this video to see how to migrate your content across environments.
Take complete control of your deployment and deploy on more robust platforms. Here is a list of the most popular recommendations and the advantages and limitations of some of these deployment options. That way, it’s easier to decide what works best for you.
Amazon AWS EC2 is a service offered as part of Amazon Web Services; it allows you to deploy your Strapi apps without worrying about how to scale or pay more than you utilize. Find their pricing on their website.
The Elastic Computer Service allows you to decide the geographical location for your instance; this improves reliability and eliminates network delay. It also runs on multiple operating from Linux, Fedora, and Redhat to Windows.
You can use the guide for help when setting up.
Advantages:
Disadvantages:
Azure is powered by Microsoft and offers Compute Service that runs on Windows and Linux, on which you can deploy complex applications. You can start without cost and pay on the go while scaling your application. The deployment guide is available in the documentation.
Advantages:
Disadvantages:
Digital Ocean offers Linux-based virtualized hardware, which can either be independent or part of a more extensive infrastructure, and access to firewalls, with unlimited scalability. Their pricing is flexible, and there is an extensive guide on how to get started.
Advantages:
Disadvantages:
Heroku is a cloud platform focused on applications and developer experience. They provide a secure, scalable database-as-a-service with constant threat monitoring and automatic operating system vulnerability patching.
You can extend applications for use with Heroku with over 200 Add-ons available in Heroku Elements Marketplace. There are different plans based on dyne hours per month; you can find the pricing on their website. If this is the option for you, you can get started using the deployment documentation.
Advantages:
Disadvantages:
The Platform.sh cloud allows developers to deploy their applications fast and worry less about scalability and database management. The main requirement is that you use Git to manage your application code.
Managing your stack on Platform.sh gives you features like Unified Environment, Multi-Services & Multi-App, Full Cluster Cloning Technology, Fail-Proof Deployments, and more. The deployment process is completed within minutes, and there is no downtime, and you can find the pricing on their website.
Advantages:
Disadvantages:
Render is a cloud-based solution for building and running apps, websites, and CDNs with free TLS certificates. They have flexible pricing and offer database management with PostgreSQL. If you are considering this option, you can follow the deployment guide here.
Advantages:
Disadvantages:
Strapi is constantly evolving; ensuring your app is deployed without hassle is a priority. Strapi recently announced Cloud beta, and the stable is coming soon with fast CDN, security, automatic backup, multi-database support, unlimited usage, and easy scalability.
Join the waitlist and while we await Strapi Cloud, leave a comment and share this article with other new Strapi users trying to decide on a deployment option.
Web and Blockchain Software Engineer who is passionate about using technology towards achieving SDGs, creating innovative solutions, open-source, and building communities. He is building EduKarma for innovative learning in Africa.