How to update

Updating BlueRange running inside a docker container is as simple as:

$ cd /opt/bluerange-setup
$ sudo git pull
[...]
From https://github.com/bluerange-io/bluerange-setup
   <ref>...<ref>  main     -> origin/main
Fast-forward
$ sudo ./bluerange-compose.sh pull
Pulling traefik         ... done
Pulling mosquitto       ... done
Pulling bluerange       ... done
Pulling mongodb         ... done
Pulling postgresql      ... done
$ sudo ./bluerange-compose.sh up --detach
bluerange_traefik_1 is up-to-date
bluerange_mosquitto_1 is up-to-date
bluerange_bluerange_1 is up-to-date
bluerange_mongodb_1 is up-to-date
bluerange_postgresql_1 is up-to-date
Recreating bluerange_traefik_1      ... done
Recreating bluerange_mosquitto_1    ... done
Recreating bluerange_bluerange_1    ... done
Recreating bluerange_mongodb_1      ... done
Recreating bluerange_postgresql_1   ... done

This will download the latest Docker image of each container before restarting the containers. The BlueRange service will be unavailable until containers have finished rebooting.

Database updates

For safety reasons the PostgreSQL and MongoDB image versions are pinned in the .env file. These versions must be overwritten in your local server.env file for updating these components.

The MongoDB has a special update procedure requiring taking actions before and after updating! Please make sure to consult the official documentation at MongoDB Release Notes.

Make sure to backup the database data before attempting an update of the database images. This can be done by stopping the containers and copying the data volumes, for example.

Update from Version 4.x to BlueRange 5

To upgrade the software to version 5.x, the version 4.79.3 must be installed firstly. This is because the database migration scripts have been baselined when entering version 5.

  1. To do so, temporarily add DOCKER_BLUERANGE=4.79.3 to the server.env file.

  2. Then run bluerange-compose.sh once without any arguments.

  3. The software is downloaded and the database migrated.

  4. Once the server accepts logins again, it is fully up and running.

  5. Potentially update external database servers, see below.

  6. Now the DOCKER_BLUERANGE key, added in the first step, can be removed safely again.

  7. Finally, run an update cycle as outlined in the beginning of this chapter.

Please backup the database before running a major release update.