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.

Off the top of my head we use AWS ECS which provides a rolling upgrade method. Push up the new container into ECR (from github actions after they pass tests) run the upgrade command, and new containers will start booting. Once they pass their health checks the load balancer starts serving traffic to them. Once they’re live, the old containers are removed.

We also use a blue/green deployment method so we don’t have to worry about breaking the production database with database changes.

@Gnubyte@lemdit.com
creator
link
fedilink
English
41Y

Thanks for weighing in. Yeah! This is basically what I am thinking I’ll have to do. I just tried Github actions and runners with a very small internal app and I liked it. I’ve never worked closely in AWS but I’ve gotten trained in/used Azure a few times and it’s basically the same thing on my end.

Robust tests, larger conditional workflows in github actions, and some sort of staggered rollout I think are the conclusion I’m arriving at.

AWS is expensive and confusingly structured, but I’ve been impressed with the ECS stuff. The UI for all of it is also way overcomplicated and stupid, but once you have it working it works.

Create a post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog