Migrate from the SQLite database in your quickstart development environment to a real PostgreSQL database hosted by Neon for your production environment...for FREE!
Up to now we have been using the Quickstart SQLite database to hold our data, but this db doesn't transfer to our deployed production server. We can use Strapi's Data Transfer feature to copy our data and push it from our local instance to the deployed instance. https://docs.strapi.io/dev-docs/data-...
However, since we are using Render's free-tier to deploy our Strapi server, we run into another problem. After ~15 minutes of inactivity our server gets shut off and anything stored on disk, like the SQLite database, gets deleted. So our data is not persistent over time.
This is obviously a huge problem. We solve it by using Neon https://neon.tech/ to host a postgres database to hold our data. We learn how to get this setup and connected with some Strapi plugins and we also use some code branch switching trickery to copy our SQLite data into the newly connected postgres db using the Data Transfer tool. https://market.strapi.io/plugins/stra...
GitHub link: https://github.com/GideonNeedleman/st...
Strapi is a headless CMS that enables you to easily author content and expose it through an API. The flexibility of Strapi allows you to choose any frontend option and seamlessly query the API to retrieve your content. Gatsby is a React-based Static Site Generator that can process a diverse range of content through its GraphQL data layer. By leveraging the Strapi API, Gatsby transforms the content into HTML pages to create a dynamic and responsive experience.
Timestamps
00:00 No data on deployed instance
01:03 Data Transfer tool
04:17 Data not persistent
08:04 Setting up Neon & Plugins
13:39 Connect Neon db to deployed Strapi server
16:00 Data Transfer into postgres db