[DO_NOT_MERGE] Fix deployments

This is still WIP, it works but not always, I don't know why. Don't forget to rebuild all the images before trying this. Will work on it later.