Docker
Online update
Checking user access rights and running the script
If the update is not performed as root — you need to make sure that the user is in the docker group.
You can check if the user is in the docker group with the following command:
- shell
id $USER | grep docker
If the user does not belong to the group, add them with the command:
- shell
sudo usermod -a -G docker $USER
The script uses curl. If your network uses a proxy server, you need to add environment variables:
export http_proxy=http://proxy.example.com:8080
export https_proxy=http://proxy.example.com:8080
Then run the Passwork update script:
- shell
./update.sh
Actions performed
- Checking for the presence of utilities
unzip,curl, andjq - Importing variables from the
.envfile - Checking the
$CERTvariable - Getting the latest available version of Passwork
- Verifying the archive using the digital signature
- Creating a backup of the database and configuration files
- Downloading and updating
- Error handling
Script completion
Before updating Passwork, the script creates a backup of the database in the directory ./backup/mongo-xxxx-xx-xx-xx:xx:xx.dump and a copy of the configuration files in the root directory ./conf-20240201-xxxxxx.tar.gz.
Offline update
Checking user access rights
If the update is not performed as root — you need to make sure that the user is in the docker group.
You can check if the user is in the docker group with the following command:
- shell
id $USER | grep docker
If the user does not belong to the group, add them with the command:
- shell
sudo usermod -a -G docker $USER
Downloading the update and running the script
Go to the Customer Portal and get the lates available Passwork 6.
Move the obtained files to the server with Passwork in the root location of the Docker build:
- shell
/<passwork>/Passwork-xxxxxx.zip
/<passwork>/xxxxxx.sig
/<passwork>/public.key
Run the update script:
- shell
cd /<passwork>/
./offline_update.sh --skip
By default, the script verifies the archive's digital signature using the provided public key. If the signature is invalid or missing, the update will be aborted.
If you trust the archive source, you can skip the signature verification:
- shell
./offline_update.sh --skip
Actions performed
- Importing variables from the .env file
- Determining the update mode:
- If an archive with the version is found, the mode is set to "zip"
- If a directory with the version is found, the mode is set to "directory"
- Creating a backup of the database and configuration files
- Checking for the presence of the Unzip utility when a .zip archive is detected
- Verifying the archive using the digital signature
- Extracting the archive contents, or copying the directory contents to the "www" folder
- Selecting the update method and executing it
- Error handling
Script completion
Before updating Passwork, the script will create a backup of the database in the directory ./backup/mongo-xxxx-xx-xx-xx:xx:xx.dump and a copy of the configuration files in the root directory ./conf-20240201-xxxxxx.tar.gz