Hey all!
I’m seeking guidance. I have a lot of apps that use ORMs like Mongoose or Sequelize or Sqlalchemy, or even just init-db scripts with raw SQL. Point is a lot of apps have changes to the data layer. When we program and make apps they tend to describe how they need to see a database. Sometimes its no trivial feat to do an upgrade - and even if you have a CI/CD pipeline in place what does that look like to have something like even lemmy upgrade in a container.
If you have these apps in production how are you handling these apps? Both developer perspective and devops welcomed.
I see the devs offering insight into maybe how the backend recognizes database state, while the devops perhaps either describing process and implementation.
Reading what you wrote here - I think this is confirming my looming suspicion. Which is that there is no standard today for upgrading docker containers. Since upgrades happen app to app. For example if I have a docker-compose deployment and
service A
islemmy
, andservice B
ispostgres
the app in this caseservice A
will have to have its own logic for handling upgrades or code migrations.In other words, the upgrade process can depend on how the software developer writes the software; independent of docker/k8s/vm’s or whatever deployment strategy you are running.
I think what I was hoping for was that I’d ask if there was a newer smooth standardized way to do software upgrades besides A/B testing or staggered rollouts but I’m not really seeing that.
I’m not super familiar with Lemmy’s codebase but it looks like they’re using diesel ORM here and have migration handling on a case by case basis for some major changes. https://github.com/LemmyNet/lemmy/blob/main/src/code_migrations.rs**___****___****___**