Skip to content

Commit

Permalink
Update .env template
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Sep 24, 2024
1 parent 96388ff commit a0dd27e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
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` and leave it running. Wait until [Nest local](http://localhost:8000/api/v1) is responding
1. In a new terminal session 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-data`
That's all you need in terms of Algolia app configuration. You can ignore their onboarding wizard instructions.
Just make sure the API key has index write permissions.
1. Run `make run` and leave it running. Wait until [Nest local](http://localhost:8000/api/v1) is responding
1. In a new terminal session run `make load-data` to populate the database from `data/` fixtures
1. In the same window run `make index-data`
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):
Expand Down
34 changes: 17 additions & 17 deletions backend/.env/template
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
DJANGO_ALGOLIA_API_KEY="None"
DJANGO_ALGOLIA_APPLICATION_ID="None"
DJANGO_ALLOWED_HOSTS="*"
DJANGO_AWS_ACCESS_KEY_ID="None"
DJANGO_AWS_SECRET_ACCESS_KEY="None"
DJANGO_CONFIGURATION="Test"
DJANGO_DB_HOST="None"
DJANGO_DB_NAME="None"
DJANGO_DB_PASSWORD="None"
DJANGO_DB_PORT="None"
DJANGO_DB_USER="None"
DJANGO_OPEN_AI_SECRET_KEY="None"
DJANGO_SECRET_KEY="None"
DJANGO_SLACK_APP_TOKEN="None"
DJANGO_SLACK_BOT_TOKEN="None"
DJANGO_SLACK_SIGNING_SECRET="None"
GITHUB_TOKEN="None"
DJANGO_ALGOLIA_API_KEY=None
DJANGO_ALGOLIA_APPLICATION_ID=None
DJANGO_ALLOWED_HOSTS=*
DJANGO_AWS_ACCESS_KEY_ID=None
DJANGO_AWS_SECRET_ACCESS_KEY=None
DJANGO_CONFIGURATION=Test
DJANGO_DB_HOST=None
DJANGO_DB_NAME=None
DJANGO_DB_PASSWORD=None
DJANGO_DB_PORT=None
DJANGO_DB_USER=None
DJANGO_OPEN_AI_SECRET_KEY=None
DJANGO_SECRET_KEY=None
DJANGO_SLACK_APP_TOKEN=None
DJANGO_SLACK_BOT_TOKEN=None
DJANGO_SLACK_SIGNING_SECRET=None
GITHUB_TOKEN=None

0 comments on commit a0dd27e

Please sign in to comment.