Whenever I run a deploy, I find that all data is lost.
I’m using the same type of database (postgres) in develop mode and production.
The cloud is AWS.
In develop mode, the database that is connected is a local PG. I don’t have access to the production database (AWS) locally.
I’m lost, what could I investigate?
Does anyone have any ideas that could help me?
APP_KEYS= '' // you can find it in your project .env file.
DATABASE_HOST= '' // database Endpoint under 'Connectivity & Security' tab
DATABASE_NAME= 'X' // DB name under 'Configuration' tab
DATABASE_USERNAME= '' // default username
AWS_ACCESS_SECRET= '' // Find it in Amazon S3 Dashboard
I assume your database is hosted in AWS RDS and not a database running from the same service (EC2, ECS) where the application is running?
Also, do you lose content, and users from the database? Is it like a fresh Strapi installation?
Thanks for helping me!
I identified the problem.
In the production env, the parameter was missing:
With that, a sqlite database was being created in production.
As always, the error is silly!
You’re not the first to make this mistake and I was going to assume this in my previous answer.
I think Strapi should be explicitly expecting this value to be provided. It shouldn’t assume it’s SQLite.
Glad you sorted it out.