Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Sep 12, 2024
1 parent d4f8759 commit 080494e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OWASP Nest

## Initial setup

1. Clone the repository code from <https://github.com/owasp/nest>
1. Copy `backend/.env/template` to `backend/.env/local`
1. Open `backend/.env/local` and change `DJANGO_CONFIGURATION` value to `Local`
1. Run `make run`, wait until [Nest local](http://localhost:8000/api/v1) is responding
1. Run `make load-data` to populate the database from `data/` fixtures
1. Go to <https://www.algolia.com/> and create a free account.
Create an Algolia app and update `DJANGO_ALGOLIA_API_KEY` and `DJANGO_ALGOLIA_APPLICATION_ID` in your `.env/local` file
1. Now you should be able to run `make index`
1. Check the data is available via API endpoints: [projects](http://localhost:8000/api/v1/owasp/search/project) and [issues](http://localhost:8000/api/v1/owasp/search/issue)

Optional steps (if you're going to manage or fetch data):

1. Run `make setup` to create a super user
1. Create a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
1. Open `backend/.env/local` and update `GITHUB_TOKEN` value
1. Now you should be able to run `make sync` command that updates your local DB data
3 changes: 1 addition & 2 deletions backend/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ RUN groupadd owasp && \
python -m pip install --no-cache-dir poetry

ENV PYTHONUNBUFFERED=1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false
POETRY_NO_INTERACTION=1

EXPOSE 8000

Expand Down

0 comments on commit 080494e

Please sign in to comment.