Skip to content

SanctumLabs/PiServer

Repository files navigation

PiCloud

Codacy Badge Build Status CircleCI codecov Codacy Badge Code Health

Upload data directly to your hard drive from wherever!

Running the app

This application is best run in a VM, so please ensure you have Vagrant installed. A VM is used to ensure there is a level playing field for all developers when running and creating the application. Although this is a nice to have, another setup invovles having docker installed, which is what the application has been built on top of.

You will find a vagrant file and a provision script which will contain all necessary tools for the VM. The VM used is ubuntu/trusty64.

$ vagrant up

This starts up the VM and will automatially provision it.

$ vagrant ssh

logs you into the VM

Once you are logged in you will already have all the necessary tools setup to run the application. This includes docker and docker compose.

$ cd /vagrant
$ docker-compose build

get into the shared directory and run docker compose command which will build the containers from the images already setup in the directories

And that is it, now you can run the application.

$ docker-compose up

This will run the multi container application in the foreground and you should be able to see the output in your console

Tests

Running tests can be done within the separate directories. The major setups are client and server.

For running server tests

# first stop the docker-compose up command, if it is still running with CTRL^C
$ cd server
$ pip install -r requirements.txt
(venv) $ python manage.py test

Will run all the tests and print a coverage report

The coverage reports will be printed to stdout and both HTML and XML reports will be generated.

The same applies for client side tests

$ cd client
$ npm install
# if using yarn
$ yarn install
$ yarn test

which will run tests in the tests directory

More information can be found in individual README.md files for both client and server

Enjoy!