Problem updating data in the separate database

Hello everyone, how are you?
Guys, I’m facing a problem like this: I separated the database from my application in Discourse, but every time I upload the application it bugs the images as if it couldn’t update the data when uploading the application again. Has anyone had this error or know of one? way to solve?

I would like to understand what you mean by upload the application and what specific error you are encountering. It would be helpful if you could provide details of your operations and the error messages you are seeing.

Based on the current information and speculating without full context, it is possible that your database has not been migrated. I have also hosted the database on a separate server. As long as the database is correctly configured in app.yml, the database will be automatically migrated during the rebuild of the image.

1 Like

I constantly need to upload the application to EC2 with the AMI updated to AWS, but the first time I do the whole process everything goes fine without any problems, but if I bury my instance, make my changes and upload it again, the application returns with the images corrupted, I don’t know if it tries to populate the database again or it is unable to update the data

Where are you storing your images (i.e. uploads & attachments)?

My guess is that you’re trying to launch some image that you didn’t build with launcher? You might be able to do something like

   rake db:migrate

after the new image has launched. (There’s a more-complicated more-correct way to postpone some migrations until the new image has launched and the old one has shut down. See SKIP_POST_DEPLOYMENT_MIGRATIONS and the db:ensure_post_migrations rake task).

Oh, and you’ll need to have all of your assets on S3 as described in Configure an S3 compatible object storage provider for uploads.

1 Like

I have a backup and restore with the model and all data already populated

Are you storing uploads and assets on S3 (can work), or not (can’t’ work)?

yes creates s3 backup.

I’m not asking about backups but uploads.