I kind of understand that when it is done like first time — ok, let’s be honest: I don’t understand the differences between bootstrap and rebuild at all, but the all mighty AI told me I should do bootstrapping when there is the first time, because it is some weird dev-staff, and after that, everytime, rebuild is just fine.
So… why not ./launcher rebuild web_only and that’s it? Because if I do destroying first I don’t have nothing to re-start if rebuilding fails, right?
I understand if I update everything, I have to stop web_only first, then do data and the last one is web_only
If you do a rebuild, it shuts down the container, then runs the bootstrap, then destroys the old container, then starts the new one.
rebuild doesn’t destroy the existing container (until it’s got a new one to start in its place)
If the bootstrap fails, you can restart the old container yourself.
The first time, there’s no reason not to do a rebuild.
For subsequent builds, you want to do the bootstrap so that the existing container can continue to service requests while the new container gets built.
For the data container, you always want to rebuild because you don’t want two database instances modifying the same files.
For the PG upgrade, you want to stop everything (web can’t work without the database anyway) before rebuilding the data container.
Rebuild also does a “git pull”, so you can use bootstrap instead to have control over that.
It’s like the hard drive for a whole computer. A container is just a whole computer that has limited ways that you can connect to it (through ports or by the files that they update that are accessible to the os.