From 679c8b8c9095d251db182a05815736b9ea9929a8 Mon Sep 17 00:00:00 2001 From: Thomas Druez Date: Mon, 21 Sep 2020 12:15:31 +0400 Subject: [PATCH] Simplify README and include link to the documentation #8 Signed-off-by: Thomas Druez --- README.rst | 92 ++++-------------------------------------------------- 1 file changed, 6 insertions(+), 86 deletions(-) diff --git a/README.rst b/README.rst index feea14306..fecf9949f 100644 --- a/README.rst +++ b/README.rst @@ -1,96 +1,16 @@ ScanCode.io =========== -Pre-requisite -------------- +ScanCode.io is a server to script and automate software composition analysis +with ScanPipe pipelines. - * Debian-like distro or macOS - * Latest version of Python 3.6: https://www.python.org/downloads/ - * PostgreSQL 10: https://www.postgresql.org/ (or https://postgresapp.com/ on macOS) - * Recent version of git: https://git-scm.com/ +First application is for Docker container and VM composition analysis. -Development setup ------------------ +Getting Started +--------------- -Clone the git ScanCode.io repo, install dependencies, and prepare the database:: +Read more about ScanCode.io here: https://scancodeio.readthedocs.org/ - git clone git@github.com:nexB/scancode.io.git && cd scancode.io - make dev - make envfile - make cleandb - -Tests ------ - -Run the tests suite with:: - - make test - -Documentation ------------- - -Start with `docs/introduction.rst`. - -Workspace ---------- - -By default, the workspace is set to a `var/` directory at the root of this codebase. -This location is used to store the input and output files such as scan results and -pipeline outputs. - -You can configure the workspace to your preferred location using the -`SCANCODEIO_WORKSPACE_LOCATION` environment variable:: - - export SCANCODEIO_WORKSPACE_LOCATION=/path/to/scancodeio/workspace/ - -Webserver ---------- - -Start the ScanCode.io Webserver with:: - - make run - -.. note:: In local development mode, the task manager worker is not required -since the tasks are executed locally instead of being sent to the queue. - -Code update ------------ - -Update the code, install dependencies, and run the database migrations:: - - cd scancode.io - git pull - make dev - make migrate - -User and Token --------------- - -You need to create a user and generate a token to access the API:: - - bin/python manage.py createsuperuser --username [USERNAME] - bin/python manage.py drf_create_token [USERNAME] - -Copy the token value from the command output. You need it to authenticate in the API. - -.. warning:: An API token is like a password and should be treated with the same care. - -Task manager ------------- - -In local development mode, you can emulate the server setup: -Webserver and task manager as their own processes. - -Turn off the `CELERY_TASK_ALWAYS_EAGER` settings and manually start the -Celery workers:: - - bin/celery multi start --app=scancodeio default low --loglevel=INFO -Ofair -c:default 1 -Q:default default -c:low 1 -Q:low priority.low --soft-time-limit:default=3600 --time-limit:default=3900 --soft-time-limit:low=14400 --time-limit:low=14700 --prefetch-multiplier=1 - -Stop the workers with:: - - bin/celery multi stop default low - - License -------