Skip to content

Commit

Permalink
docs(devenv): minor Dev Env polish (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk authored Jun 10, 2024
2 parents e1224cc + c5171d8 commit 7392077
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
44 changes: 40 additions & 4 deletions docs/development/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,44 @@ docker-compose -f docker-compose.dev.yml up
```

## VSCode
You can run Keep from your VSCode (after cloning the repo) by adding this configurations to your `launch.json`:
You can run Keep from your VSCode (after cloning the repo) by adding this configurations to your `.vscode/launch.json`:

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Keep Backend",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "keep/cli/cli.py",
"console": "integratedTerminal",
"justMyCode": false,
"args": ["--json", "api","--multi-tenant"],
"env": {"PYDEVD_DISABLE_FILE_VALIDATION": "1"}
"env": {
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
"PYTHONPATH": "${workspaceFolder}/",
"PUSHER_APP_ID": "1",
"SECRET_MANAGER_DIRECTORY": "./state/",
"PUSHER_HOST": "localhost",
"PUSHER_PORT": "6001",
"PUSHER_APP_KEY": "keepappkey",
"PUSHER_APP_SECRET": "keepappsecret",
}
},
{
"name": "Keep Simulate Alerts",
"type": "debugpy",
"request": "launch",
"program": "scripts/simulate_alerts.py",
"console": "integratedTerminal",
"justMyCode": false,
"env": {
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
"PYTHONPATH": "${workspaceFolder}/",
"KEEP_API_URL": "http://localhost:8080",
"KEEP_API_KEY": "some-api-key"
}
},
{
"name": "Keep Frontend",
Expand All @@ -41,9 +64,22 @@ You can run Keep from your VSCode (after cloning the repo) by adding this config
"cwd": "${workspaceFolder}/keep-ui",
}
]
}
}
```

Install dependencies:
```
pip install poetry'
poetry install;
cd keep-ui && npm i;
```

Launch Pusher ([soketi](https://soketi.app/)) container in parallel:
```bash
docker run -d -p 6001:6001 -p 9601:9601 -e SOKETI_USER_AUTHENTICATION_TIMEOUT=3000 -e SOKETI_DEFAULT_APP_KEY=keepappkey -e SOKETI_DEFAULT_APP_SECRET=keepappsecret -e SOKETI_DEFAULT_APP_ID=1 quay.io/soketi/soketi:1.4-16-debian
```


## VSCode + Docker
<Info>For this guide to work, the VSCode Docker extension is required.</Info>
<Tip>In air-gapped environments, you might consider building the container on an internet-connected computer, exporting the image using docker save, transferring it with docker load in the air-gapped environment, and then using the run configuration.</Tip>
Expand Down
2 changes: 2 additions & 0 deletions docs/providers/documentation/pagerduty-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Certain scopes may be required to perform specific actions or queries via the Pa

The provider uses either the events API or the incidents API to create an alert or an incident. The choice of API to use is determined by the presence of either a routing_key or an api_key.

An expired trial while using the free version of PagerDuty may result in the "pagerduty scopes are invalid" error at Keep.

## Useful Links

- Pagerduty Events API documentation: https://v2.developer.pagerduty.com/docs/send-an-event-events-api-v2
Expand Down
6 changes: 5 additions & 1 deletion keep-ui/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET= # Linux: `openssl rand -hex 32` or go to https://generate-secret.now.sh/32
# API
NEXT_PUBLIC_API_URL=http://localhost:8080
API_URL=http://localhost:8080
# Auth
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_ISSUER=
# Pusher
PUSHER_HOST=localhost
PUSHER_PORT=6001
PUSHER_APP_KEY=keepappkey

0 comments on commit 7392077

Please sign in to comment.