Help me understeand Strapi correctly

Hi, I’m working on a site for my portfolio. It’s portfolio + blog site, nothing fancy just 20 images and 15 mock articles, I’m using GatsbyJS and Strapi. The site is done already and I just need to host it. As this is just a mock site I’d like to use free hosting, so I went with Heroku.

The problem is that every time the build is triggered I need to re-register myself, the content types remain however, all data is wiped out. I’ve read that Heroku doesn’t have a persistent file system, so I will use Cloudinary to store my images. Now the real question.

What to do with articles? When I create an article on Heroku, will it remain stored there? If no can you suggest some free site where can I store them? Also can I migrate my articles from localhost to Heroku? My articles are .mdx I think as I’m using react-markdown to render them properly.

Also, do I need to re-register every time? Shouldn’t I just log in?

You should use a dedicated database to keep the data, for example: Fully Managed Database as a Service - PostgreSQL | Heroku

|ecause Heroku wipes all the data when your dyno restarts.

Thank you, I will go with MySQL cause I have experiences with it. Do I need to setup some tables or columns for my content types or Strapi handles that automatically?

Strapi handles all the table/column creation. You just need to create an empty database.

So the main tips when using Heroku are:

  • Use CDN for file uploads
  • Use a Dedicated database (don’t use SQLite, the database should be outside of the dyno)

Thank you, I’ve managed to get it running using MySQL database. Now I just need to setup Cloudinary for images :slight_smile:

What do I need to do to tell Strapi to actually create the tables when I deploy my project?