0

I ran into strange Heroku behavior after I published my backend to Strapi on it. From time to time (few times during the day), my whole backend data is completely cleared, deleting all posts that I made, as well as all users and permissions. I have to re-register every time to get access and then manually add all the content once again.

Can you please tell me why is it so, and how to avoid it? I am making no commits during this time.

  • I don't know anything about Strapi, but if it saves any date on the local filesystem (e.g. in files or file-based databases like SQLite) you're just running into Heroku's ephemeral filesystem. – ChrisGPT was on strike Dec 09 '21 at 02:32
  • It looks like [Strapi supports a few database servers](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/installation/cli.html#preparing-the-installation). Which one are you using? Assuming it's SQLite, please see the following proposed duplicate. – ChrisGPT was on strike Dec 09 '21 at 02:34
  • Does this answer your question? [Can I use a file based database on Heroku?](https://stackoverflow.com/questions/50421061/can-i-use-a-file-based-database-on-heroku) – ChrisGPT was on strike Dec 09 '21 at 02:34
  • Dear Chris, I created AWS S3 bucket, provided Public access to everything set CORS created a User in IAM provided him AmazonS3FullAccess get his Access key ID & Secret key then in terminal (connected to hiroku) I setup the following: heroku config:set AWS_ACCESS_KEY_ID=*** AWS_SECRET_ACCESS_KEY=*** heroku config:set S3_BUCKET_NAME=mielenyvin heroku config:set AWS_URL=https://mielenyvin.s3.amazonaws.com/ heroku config:set AWS_S3_REGION_NAME=us-east-2 But all the posts from my db as well as roles still disappearing. Nothing appearing in my bucket when I am adding a new post. – Dmitry Kotikov Dec 09 '21 at 14:44

0 Answers0