Updating to a new major version
The new major version of GitFlic requires Java 17 or higher.
Before updating, determine the GitFlic installation method:
- basic installation on Linux;
- installation on Astra Linux;
- launch using Docker Compose.
When using a basic installation or Astra Linux, check the Java version in the system before updating. When using Docker Compose, the required Java version is already included in the GitFlic image.
Before switching to a new version, it is recommended to create a backup copy of the GitFlic database and files.
Basic installation on Linux
Before updating, check the Java version:
java --version
Java 17 or higher must be used to run the new version of GitFlic.
If GitFlic is started as a systemd service, additionally check the Java version at the path specified in ExecStart:
/usr/bin/java --version
To check Java on behalf of the GitFlic system user, run:
sudo -u gitflic /usr/bin/java --version
In all cases, Java 17 or a newer version must be displayed.
Updating Java
If a version below Java 17 is used, install OpenJDK 17.
For Debian-based systems, an installation example is as follows:
sudo apt update
sudo apt install openjdk-17-jdk
If several Java versions are installed in the system at the same time, check the available options with the command:
sudo update-alternatives --config java
Select Java 17 or a newer version from the list.
After the change, check the version again:
java --version
sudo -u gitflic /usr/bin/java --version
After preparing Java, perform the standard GitFlic update.
For an installation running through systemd, it is required to:
-
Stop GitFlic:
sudo systemctl stop gitflic-server -
Replace
gitflic.jarwith the file from the new version delivery package:sudo cp gitflic.jar /opt/gitflic/bin/gitflic.jar -
Start GitFlic:
sudo systemctl start gitflic-server -
Check the service status:
sudo systemctl status gitflic-server
Updating on Astra Linux
The new major version of GitFlic requires Java 17 or higher.
Before changing the repository configuration, determine the Astra Linux version in use and check whether openjdk-17-jdk is available in the official repositories.
The availability of the package for a specific operating system version can be checked in the Astra Linux repository navigator.
For the search, specify the package:
openjdk-17-jdk
In the search results, check:
- the Astra Linux release;
- the repository containing the package;
- the available package version.
If openjdk-17-jdk is missing for the Astra Linux version in use, prepare an environment with Java 17 or higher available before updating GitFlic.
Connecting repositories
To install packages from the Astra Linux extended repository, the main and extended repositories corresponding to the operating system version in use must be connected.
Check the current configuration with the command:
cat /etc/apt/sources.list
If the file contains an installation source from a disk of the following type:
deb cdrom:
it must be commented out.
For Astra Linux 1.8, an example configuration is as follows:
deb https://download.astralinux.ru/astra/stable/1.8_x86-64/repository-main/ 1.8_x86-64 main contrib non-free
deb https://download.astralinux.ru/astra/stable/1.8_x86-64/repository-extended/ 1.8_x86-64 main contrib non-free
The repository configuration must match the installed and supported Astra Linux version.
After changing the repository list, update the package information:
sudo apt update
Check the availability of OpenJDK 17 in the connected repositories:
apt policy openjdk-17-jdk
If the package is available, install Java 17:
sudo apt install openjdk-17-jdk
After installation, check the version:
java --version
If several Java versions are installed in the system, select the required one:
sudo update-alternatives --config java
After selection, check the Java used by GitFlic again:
java --version
sudo -u gitflic /usr/bin/java --version
The version must be Java 17 or higher.
After preparing Java, the GitFlic update is performed in the standard way:
sudo systemctl stop gitflic-server
sudo cp gitflic.jar /opt/gitflic/bin/gitflic.jar
sudo systemctl start gitflic-server
After startup, check the service status:
sudo systemctl status gitflic-server
Updating when using Docker Compose
When GitFlic is launched using Docker Compose, installing or updating Java on the host system is not required.
The required Java version is already included in the GitFlic Docker image. To switch to a new major version, update the application image in use.
Updating the image from the registry
If the GitFlic image is downloaded from a registry, go to the directory with docker-compose.yaml and get the new image version:
docker compose pull
After downloading the image, restart the services:
docker compose down
docker compose up -d
Updating the Enterprise image from a file
If the Docker image is included in the Enterprise delivery package, load the new image into Docker:
docker load -i gitflic-server-ee.tar
In the .env file, specify the image of the new version:
GITFLIC_IMAGE=gitflic-server-ee:<актуальный тег>
After the change, start the services:
docker compose down
docker compose up -d
When updating the Docker image, changing the Java version inside the container separately is not required.
Check after updating
After updating, check that GitFlic starts.
For installation on an operating system:
sudo systemctl status gitflic-server
For installation using Docker Compose:
docker compose ps
After successful startup, open the GitFlic web interface and check application availability.
If a startup error occurs, check the application log.
For a standard installation:
tail -f /opt/gitflic/logs/server.log
For Docker Compose:
docker compose logs
Automated translation!
This page has been automatically translated. The text may contain inaccuracies.