Update Passwork to Docker
If the upgrade is not performed as root — you need to make sure that the user is a member of the docker group.
Verify the user in the docker group:
Adding a user to the docker group:
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
Run the script to update Passwork:
- Check for unzip, curl, and jq utilities
- Import variables from .env file
- Checking $CERT variable
- Getting the latest available version of Passwork
- Downloading and upgrading
- Backing up the database and configuration files
- Error handling
The script will automatically back up the database in the ./backup/mongo-xxxxxx-xxxx-xxxx-xx-xxxx:xx:xx.dump directory and a copy of the configuration files in the root directory ./conf-20240201-xxxxxxxx.tar.gz. The containers should then be restarted passwork_nginx and passwork_php
If the upgrade is not performed as root — you need to make sure that the user is a member of the docker group.
Verify the user in the docker group:
Adding a user to the docker group:
Go to the customer portal and download the current version of Passwork:
Move the downloaded version to the Passwork server in the root directory of the installation and run the script to update Passwork:
The script searches for an archive or directory named — Passwork-*, if the name of the directory or archive is changed, the script will fail to update Passwork and an error will be displayed.
- Importing variables from an .env file
- Defining the update mode
- If the archive with the version is found, the mode is set to "zip"
- If the directory with the version is found, the mode "directory" is set
- If an archive (zip) is found, the unzip utility is checked to see if it is available
- Functions for updating
- Extracts the contents of the archive and copies it to the "www" directory
- Copies the contents of the directory to the "www" directory
- Selection of the update method and execution
- Creating a backup of the database and configuration files
- Error handling
The script will automatically backup the database in the ./backup/mongo-xxxxxx-xxxx-xxxx-xx-xxxx:xx:xx.dump directory and copy the configuration files in the root directory ./conf-20240201-xxxxxxxx.tar.gz. After that the passwork_nginx and passwork_php containers must be restarted