Skip to content

Commit

Permalink
fix #529 by updating the docs to remove dependency of in-repo db
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Jul 21, 2024
1 parent 8567499 commit 7f6e309
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<pre>git clone https://github.com/OWASP/common-requirement-enumeration </pre>

Copy sqlite database to required location
<pre>cp cres/db.sqlite standards_cache.sqlite</pre>

Install dependencies
<pre> make install </pre>


# Running

### Locally
Expand All @@ -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:
<pre>git clone https://github.com/OWASP/common-requirement-enumeration </pre>

* Install dependencies
<pre> make install </pre>

* Download the latest CRE graph from upstream by running
<pre>python cre.py --upstream_sync</pre>
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
<pre>python cre.py --help</pre>

Expand Down

0 comments on commit 7f6e309

Please sign in to comment.