Database
...
Examples of authorization sett...
Setting up authorization in Docker
11 min
back up and clear mongodb data creating a backup go to the root directory of passwork cd /\<passwork>/ run the backup script /db backup sh clearing collections and data stop and delete the passwork db container docker compose down db clear previously created mongodb collections and data rm rf /data/mongo/ create a mongodb user and start the container creating a user edit and complete the env variable file insert the following lines and specify your values \# the name of the database user at initialisation mongo initdb root username=adminuser \# the password of the database user at initialisation mongo initdb root password=password you can't use characters in mongodb — , @ , $ , , % , " , ' , / , \ , | in the username and password, as this may cause malfunctions in the connection of the application server to mongodb starting the container start the passwork db container docker compose up d db check the running container docker ps | grep passwork db restore from backups and connectpasswork restoring databases run the restore script /db restore sh specify the created backup from step one enter the backup file name to restore mongo xxxx xx xx xx\ xx\ xx dump verify connection to mongodb with authorisation docker exec it passwork db mongo "mongodb //adminuser\ password\@localhost 27017" setting up and connecting passwork with authorization you need to edit the passwork configuration file at /\<passwork>/conf/keys/config env and specify the login and password of the created user mongodb username=adminuser mongodb password=password save the changes and refresh the passwork page to test the connection with mongodb authorisation