Secretary service of Stay Safe project
If you haven't build yet:
$ docker-compose build api db
After that you just need to run:
$ docker-compose up api db
To have access to pdb (debug library) when running, use the following command:
$ docker-compose run --service-ports api python -u main.py
$ docker-compose run api sh -c "pylint **/*.py"
$ docker-compose run api coverage run -m pytest
$ docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest
$ docker run -ti -v $(pwd):/usr/src --link sonarqube newtmitch/sonar-scanner -Dsonar.projectName="Secretary Service" -Dsonar.projectKey=secretaryservice
Link to see the scans projects: http://localhost:9000/projects
$ docker-compose run api coverage report -m
$ docker-compose run crawler_crimes scrapy crawl spider_name
Crontab is a time-based job scheduler in Unix-like operating systems, it doesn't need to install if you're using a Unix based SO.
Enter the following command to edit your crontab file:
$ crontab -e
If it's empty you should set the first line of the file with:
SHELL=/bin/bash
After that you just need to set the command to run a job.
To run a sh file at 2am of the first day of the month:
0 2 1 * * /home/user/stay-safe/src/crawlers/df.sh
To understand more about crontab schedule expressions click here
Every sh file must be in the correct permission, to set the correct permission run:
chmod +x script-name-here.sh