[Experimental] Web service to call FOSSLight Scanner with url.
- Add server ip to the mail server
$sudo vi /etc/mail/access
YOUR_FLASK_SERVER_IP RELAY
$sudo makemap hash /etc/mail/access < /etc/mail/access
- Install redis-server on the flask server
$ sudo apt-get install redis-server
$ redis-server
$ sudo /etc/init.d/redis-server status
- Update variables in src/fosslight_scanner_service/config.py
SERVER_IP = "127.0.0.1"
SERVER_PORT = 5001
ROOT = "/home/test"
MAIL_SERVER = ...
FL_HUB_TOKEN = ...
FL_HUB_REGISTER_URL = ...
Run on Python 3.6+.
$ sudo apt-get install python-dev
$ sudo apt-get install python3-setuptools
$ python3 -m pip install --upgrade pip setuptools wheel
$ pip3 install -r requirements.txt
$ wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/v10.0.0/setup.sh
$ chmod a+x setup.sh
$ ./setup.sh email add {email_address}
$ docker-compose up -d mail
$ cd src/fosslight_scanner_service
(venv)src/fosslight_scanner_service$ celery -A run_server.celery worker --loglevel=debug -c 3 &
(venv)src/fosslight_scanner_service$ python run_server.py &
- Check status of project's analyzing process
http://{IP}:5001/status?pid=35
- Return Value NULL : process does not run, PROGRESS : In Progress, url_to_download_result_file : RESULT_FILE
- Upload files
curl -X POST {IP}:5001/fileupload -F file=@/home/test/FOSSLight-Report.xlsx -F 'pid=35'
- Start to run scanning
http://{IP}:5001/run_fosslight?pid=35&link=https://github.com/LGE-OSS/example&[email protected],[email protected]
- Download result file
http://{IP}:5001/download?download_file=35_result_2021-05-24_15-50-12.xlsx
Please report any ideas or bugs to improve by creating an issue in fosslight_scanner service repository.
Then there will be quick bug fixes and upgrades. Ideas to improve are always welcome.
FOSSLight Scanner Service is released under Apache-2.0.