diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 68abd268a..6b2f4b3fe 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "storage": "32gb" }, "image": "mcr.microsoft.com/devcontainers/universal:2", - "postCreateCommand": "make install && make frontend && cp cres/db.sqlite standards_cache.sqlite", + "postCreateCommand": "make install && make frontend && python cre.py --upstream_sync", "extensions": [ "ms-python.vscode-pylance", "visualstudioexptteam.vscodeintellicode", diff --git a/Makefile b/Makefile index 5315b9c38..6af2db803 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ .PHONY: run test covers install-deps dev docker lint frontend clean all prod-run: - cp cres/db.sqlite standards_cache.sqlite; gunicorn cre:app --log-file=- + gunicorn cre:app --log-file=- docker-neo4j-rm: docker stop cre-neo4j @@ -99,12 +99,6 @@ clean: find . -type f -name '*.log' -delete find . -type f -name '*.orig' -delete -migrate-restore: - if ! [ -f "standards_cache.sqlite" ]; then cp cres/db.sqlite standards_cache.sqlite; fi - [ -d "./venv" ] && . ./venv/bin/activate &&\ - export FLASK_APP=$(CURDIR)/cre.py - flask db upgrade - migrate-upgrade: [ -d "./venv" ] && . ./venv/bin/activate &&\ export FLASK_APP=$(CURDIR)/cre.py diff --git a/README.md b/README.md index eb7df4a7a..17ccae97c 100644 --- a/README.md +++ b/README.md @@ -31,20 +31,6 @@ Example: the session time-out topic will take the user to relevant criteria in s Some of the data has been kindly contributed by the SKF and ASVS projects -# Installing - - -To install this application you need python3, yarn and virtualenv. -Clone the repository: -
git clone https://github.com/OWASP/common-requirement-enumeration 
- -Copy sqlite database to required location -
cp cres/db.sqlite standards_cache.sqlite
- -Install dependencies -
 make install 
- - # Running ### Locally @@ -56,6 +42,19 @@ You can do so by running: After the container has finished downloading the remote information you can access it in [localhost](http://127.0.0.1:5000) #### Command Line + +To run outside of Docker you need to install OpenCRE. +To install this application you need python3, yarn and virtualenv. +* Clone the repository: +
git clone https://github.com/OWASP/common-requirement-enumeration 
+ +* Install dependencies +
 make install 
+ +* Download the latest CRE graph from upstream by running +
python cre.py --upstream_sync
+Keep in mind that until [Issue #534](https://github.com/OWASP/OpenCRE/issues/534) is fixed you won't have access to gap analysis results locally + To run the CLI application, you can run
python cre.py --help