Skip to main content
Version: 7.0

Docker

Online update

Checking user rights and running 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:

id $USER | grep docker

If the user does not belong to the group, add them with the command:

sudo usermod -a -G docker $USER
danger

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:

./update.sh
Actions performed
  1. Checking for the presence of utilities unzip, curl, and jq
  2. Importing variables from the .env file
  3. Checking the $CERT variable
  4. Getting the latest available version of Passwork
  5. Verifying the archive using the digital signature
  6. Creating a backup of the database and configuration files
  7. Downloading and updating
  8. 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 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:

id $USER | grep docker

If the user does not belong to the group, add them with the command:

sudo usermod -a -G docker $USER

Downloading update and running script

Go to our Customer Portal and get the latest available version of Passwork with a digital signature:

Example of obtaining Passwork version 7

To verify the digital signature, you also need the Passwork public key public.key, ways to obtain it:

Manually

  • Open URL;
  • Copy all the contents;
  • Paste into a file and save the content with the name — public.key.

Automatically (curl or wget)

curl -o public.key https://passwork.pro/public-key

Move the obtained files to the server with Passwork in the root location of the Docker build:

/<passwork>/Passwork-xxxxxx.zip
/<passwork>/xxxxxx.sig
/<passwork>/public.key

Run the update script:

cd /<passwork>/
./offline_update.sh
info

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:

./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