Standard installation
...
Linux
Passwork Migration
Migration from Linux to Docker
13min
These instructions describe how to prepare and migrate Passwork, installed on Linux, to Docker.
These instructions are intended for a single Passwork installation and are not suitable for a fault-tolerant solution.
- Check the installed version of Passwork — cat /var/www/app/config/config.php | grep version. If version:
- Create a MongoDB backup:
- Local installation (MongoDB) without authorisation — mongodump --archive > mongo.dump
- Local installation (MongoDB) with authorisation — mongodump --archive --authenticationDatabase admin --username=username --password=password > mongo.dump
- Installing (MongoDB) on a separate server — mongodump --host host:port --archive --authenticationDatabase admin --username=username --password=password > mongo.dump
- Create a copy of the config.ini configuration file, by default located in — /var/www/app/app/config/config.ini
- Create a copy of the default licence key located in — /var/www/app/keys/passwork-*.keys
If installing in Docker, it will use the same domain name and SSL certificate as the previous Passwork installation. It is necessary to copy SSL certificates if HTTPS connection is configured. You can find the paths to the certificate, key and full chain files using the commands:
- DEB (Debian, Ubuntu, etc) — grep -rE 'SSLCertificate(File|ChainFile|KeyFile)' /etc/apache2/sites-enabled/
- RMP (RedHat, Centos, etc) — grep -rE 'SSLCertificate(File|ChainFile|KeyFile)' /etc/httpd/conf.d/
- Install Docker and Docker Compose
- Create and navigate to the directory where you plan to deploy the new Passwork Docker assembly.
- Download the installation script — wget https://repos.passwork.pro/repository/docker/passwork_compose_install.sh
- Download the migration script — wget https://repos.passwork.pro/repository/docker/migrate.sh
- Assign execution rights — chmod +x ./*.sh
- Create a directory — mkdir ./linux
- Place the previously copied files from the "Preparation" step into the linux directory:
- Configuration file — config.ini
- Licence key — passwork-*.keys
- MongoDB backup
- SSL certificates of Passwork website
- Run the script with the -ml flag — sudo ./passwork_compose_install.sh -ml
- The installation script will perform a basic installation of the latest version of Passwork available in your licence and automatically run the migration script.
- After the scripts are finished, check that the new installation is working properly and make adjustments if necessary — https://docs.passwork.pro/online-installation#cMZWh
- To add mail server or LDAPS protocol root certificates to trusted certificates, copy the .pem or .crt root certificates to the ./conf/custom_ca directory and restart the PHP container — docker compose restart passwork_php
- To change the SSL certificate used, copy the certificate/certificate chain to ./conf/ssl/fullchain.pem and the private key to ./conf/ssl/privkey.pem and restart the Nginx container — docker compose restart passwork_nginx
Issue. Error of rights to one or another base when trying to create a full backup:
Solution. Log in to the MongoDB management shell as the current administrator and add the role:
Updated 31 Oct 2024
Did this page help you?
TABLE OF CONTENTS