Updating the system¶
Standard update guide¶
Recommendation
Before performing an update, make sure to create a full backup of the platform.
To update the system, you need the latest versions of the following files: docker-compose.yml, external-db.override.yml, app.env, and .env, which can be obtained from the vendor.
In the .env file, the variable CODESCORING_VERSION specifies the target platform version.
The latest available version can be found in the Changelog.
Then follow these steps:
-
Navigate to the directory containing the deployment files:
-
Pull the latest images:
-
Restart the platform:
Restoring a previous version¶
If errors occur after the update or the system becomes unstable, you can restore the previous platform version from a backup:
-
Stop the current installation:
-
Clear the database using any preferred method:
- via Docker:
- by manually dropping the database (
DROP DATABASE); - or, if using Kubernetes:
-
Restore the database from the previously created backup.
-
In the
.envfile, set theCODESCORING_VERSIONvariable to the previous version value. -
Restart the platform:
Detailed instructions for creating and restoring backups are available in the Backup guide.
Update guides for versions with changes in configuration¶
[2025.21.0] – 2025-05-21¶
Starting with this version, the value of the environment variable $SECRET_KEY will be used to encrypt sensitive data in the database and changing the value of this variable will require additional operations.
Before upgrading, you must ensure that the .env file specifies the correct (unique, unpredictable) value of $SECRET_KEY, and not the default value.
[2025.13.0] - 2025-03-28¶
- You must ensure that the version of
Docker Engineis greater than or equal to 25. To do this, run thedocker versioncommand on the machine with the platform. If the Docker Engine version is lower than 25, you need to update Docker. - IMPORTANT! Before updating Docker, you must stop the platform normally.
- You must add the name of the docker compose project to the configuration:
- Before shutting down the system for updating, you must note the name of the docker compose project in which the platform is currently running.
- This is either the value passed with the
-pparameter todocker compose, or the name of the directory where thedocker-compose.ymlfile was located, by default --on-premiseoron-premise-split-db - This value is used as a prefix in the name of resources created by compose: volumes, containers, networks
- You must enter this value in the
.envfile with the keyCOMPOSE_PROJECT_NAME= - IMPORTANT! If you do not do this, the platform will not start. If you enter an incorrect value, volumes with a new prefix will be created, and the platform on the new version will start "from scratch"
- After the value is added to the
.envfile, requests todocker composecan be made without the-p PROJECT_NAMEoption - You need to download the updated
docker-compose.ymlandexternal-db.override.ymlfiles from the CodeScoring registry and place them in the directory with the compose file.