To configure your application, create a yaml file at <YOUR_APP_DIR>/config.yml . To help you
to use correct sections and entries, you have a sample file named config-sample.yml.
Note that if no config.yml file is found, application will use config-sample.yml file instead.
Please read the detailed configuration documentation before going further.
To run vertest, you just need to install docker and docker-compose.
Then clone the GIT repository or get an archive of the codebase.
$ git clone https://github.com/riegelTech/vertest.git
$ cd vertestInstall all nodeJS modules, using npm :
$ npm installBuild front-end application :
$ npm run buildThen uninstall development modules :
$ npm prune --productionOnce the frontend is built, just type
$ docker-compose upThere is no official backup script, even if a rollbak_demo.sh script exists and help me to maintain
the demo server, doing backups and restorations automatically.
The most important thing to know is that the data are located in three places :
- MongoDB
- the
repositoriesDirdirectory (see the configuration documentation) - the logs directory (see the configuration documentation)
To dump the repositories and the logs, I let you make an archive or a deep copy of the directories.
To dump the database, you have to exec the dump MongoDB command in the corresponding docker container.
- Ensure the mongodb container is running, if not, type:
$ docker-compose up mongo - Get the container name
$ docker-compose ps | grep mongod | grep -Eo "^([A-Za-z0-9_-]*)" - Execute the dump command
$ docker exec "[YOUR_CONTAINER_NAME]" bash -c "cd /data/db/ && mongodump -d vertest -c users -o ./ && mongodump -d vertest -c testSuites -o ./ && mongodump -d vertest -c metadata -o ./" - You can now find in
mongoDataa new directory calledvertestthat contains the dump
Note that this will probably require super user rights
To restore the logs and the repositories, just replace all dedicated directories content by the backup.
To restore the database, you have to exec the restore MongoDB command in the corresponding docker container.
- Copy the dump directory
vertestin themongoDatadirectory - Ensure the mongodb container is running, if not, type:
$ docker-compose up mongo - Get the container name
$ docker-compose ps | grep mongod | grep -Eo "^([A-Za-z0-9_-]*)" - Execute the restore command
docker exec "[YOUR_CONTAINER_NAME]" bash -c "cd /data/db/ && mongorestore -d vertest -c testSuites --drop vertest/testSuites.bson && mongorestore -d vertest -c users --drop vertest/users.bson && mongorestore -d vertest -c metadata --drop vertest/metadata.bson" - Now stop the container and restart
docker-compose down && docker-compose up
Note that this will probably require super user rights