dokku / dokku-pro-issues

Temporary location for issues with installing or using dokku pro
0 stars 0 forks source link

Release history / rollback support #12

Open gamedevsam opened 1 year ago

gamedevsam commented 1 year ago

Description of feature

Having the ability to rollback an app to a previous good release would a great feature. It would also set the ground-work for app pipelines (having a staging and prod environments, where a prod deployment is just a promote / redeploy of the staging artifacts).

gamedevsam commented 1 year ago

@josegonzalez is this part of your pipelines work? Being able to restore a good image with a single click / command is a very valuable feature, whether that's restoring by git hash or a unique number for each deploy.

josegonzalez commented 1 year ago

The weird thing here is that images aren't stored locally, so you'd need a remote registry configured that has those images. We can definitely do this based on git history (and I have an internal ticket to eventually explore a simple git repo ui of some sort, but maybe there is a history I can have there too) but because we don't store images, we'd need to somehow track those (with integration with the registry plugin and some way that tracks what remote images have been deployed).

Let me think on this further. I'll file a ticket internally for myself to plan this out, but this isn't planned for a given release at this time.

gamedevsam commented 1 year ago

Why aren't images stored locally? Is there a downside to doing that?

Couldn't you just rename old images and keep an internal counter of images that have been created for an app? That way rolling back to a previous version just involves spinning up an old image, making sure it's alive and swapping active image.

Ideally users could configure the number of images kept around (in my case I'd only want to have one, the previous release, so I could go back to it quickly if I broke something in production).

josegonzalez commented 1 year ago

The downside is disk utilization. While many will have a common base, you're sometimes looking at an extra gig or so for each image on top of the base.

This is something handled upstream in Dokku, so maybe we can open a discussion there and figure out how this might be better configured there :)

With the registry plugin, we push the built image as a tag to a remote, and then can revert to a given image at any point in time later.