diff --git a/README.md b/README.md index e69de29bb..547086dc1 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,20 @@ +# OWASP Nest + +## Initial setup + +1. Clone the repository code from +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 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 diff --git a/backend/Dockerfile.local b/backend/Dockerfile.local index cf3562dc5..a326e67a5 100644 --- a/backend/Dockerfile.local +++ b/backend/Dockerfile.local @@ -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