Skip to main content
Version: 7.0

Docker

danger

Attention.

If the Docker build lacks the Passwork update scripts (update.sh and offline_update.sh), then an old Docker build is used, please contact Passwork technical support for further instructions.

Online update

Checking user rights and running script

If the update is not performed as root — you need to make sure 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 is not in the group, add them with the command:

sudo usermod -a -G docker $USER
info

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 unzip, curl, and jq utilities
  2. Importing variables from the .env file
  3. Checking the $CERT variable
  4. Getting the latest available Passwork version
  5. Creating a backup of the database and configuration files
  6. Downloading and updating
  7. Error handling

Completing script

Before updating Passwork, the script creates a database backup in the directory ./backup/mongo-xxxx-xx-xx-xx:xx:xx.dump and a copy of configuration files in the root directory ./conf-20240201-xxxxxx.tar.gz.

After running the script, you need to restart the passwork_nginx and passwork_php containers:

docker restart passwork_nginx passwork_php

Offline update

Checking user rights

If the update is not performed as root — you need to make sure 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 is not in the group, add them with the command:

sudo usermod -a -G docker $USER

Downloading update and running script

Go to the Customer Portal and download the current version of Passwork:

Example of obtaining Passwork version 6

Move the downloaded archive to the root installation directory on the server and run the Passwork update script:

./offline_update.sh
info

The script searches for an archive or directory named Passwork-*
If the name does not match the pattern, you will see an error.

Actions performed
  1. Importing variables from the .env file
  2. Determining the update mode:
    1. If an archive with the version is found, the "zip" mode is set
    2. If a directory with the version is found, the "directory" mode is set
  3. Creating a backup of the database and configuration files
  4. Checking for the presence of the Unzip utility when a .zip archive is detected
  5. Unpacking the archive contents or copying the directory contents to the "www" folder
  6. Selecting the update method and executing it
  7. Error handling

Completing script

Before updating Passwork, the script will create a database backup in the directory ./backup/mongo-xxxx-xx-xx-xx:xx:xx.dump and a copy of configuration files in the root directory ./conf-20240201-xxxxxx.tar.gz.

After running the script, you need to restart the passwork_nginx and passwork_php containers:

docker restart passwork_nginx passwork_php