Chapter 9: Production-Ready Applications
In this chapter, we will discuss some of the best practices, tips, and tricks, as well as strategies that we can use to run a Strapi application in a production environment. First, we will learn how to use the Strapi bootstrap
function to seed the database. Then, we will see how to keep permissions in sync between multiple environments. Afterward, we will explain how to use Simple Storage Service (S3) to host our media files and assets. Finally, we will explain the required changes to use a database other than SQLite.
Here are the topics we will cover in this chapter:
- Create a seeder function to populate the database with required data for the API.
- Sync permissions between multiple environments.
- How to set up Strapi to save media in an S3 bucket.
- How to configure Strapi to use a Postgres database.
As we have seen so far, most of the settings and configurations such as routes, policies, and plugin settings live...