Bootstrap && destroy && start

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.

3 Likes