Skip to content

Commit

Permalink
feat: add container name & fetch catch
Browse files Browse the repository at this point in the history
  • Loading branch information
robot9706 committed Oct 6, 2023
1 parent a180280 commit e31827f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@

## Getting started

1. Enter `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -d ghcr.io/dyrector-io/darklens:latest` in terminal
1. Enter `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -n darklens -d ghcr.io/dyrector-io/darklens:latest` in terminal
2. Open `localhost:8000` in browser
3. Enjoy!

### Other options

* Start without authorization: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e DISABLE_AUTH=true -d ghcr.io/dyrector-io/darklens:latest`
* Select a stronger JWT secret: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e JWT_SECRET=supersecret -d ghcr.io/dyrector-io/darklens:latest`
* Run on a public domain: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e PUBLIC_URL=example.com AGENT_ADDRESS=example.com:5000 -d ghcr.io/dyrector-io/darklens:latest`
* Start without authorization: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e DISABLE_AUTH=true -n darklens -d ghcr.io/dyrector-io/darklens:latest`
* Select a stronger JWT secret: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e JWT_SECRET=supersecret -n darklens -d ghcr.io/dyrector-io/darklens:latest`
* Run on a public domain: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -e PUBLIC_URL=example.com AGENT_ADDRESS=example.com:5000 -n darklens -d ghcr.io/dyrector-io/darklens:latest`
* Note: Agents require gRPC port 5000 to connect to the service
* Persist data: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -v darklens-data:/var/lib/darklens -d ghcr.io/dyrector-io/darklens:latest`
* Use secure agents: `docker run -p 8000:8000 -p 5000:5000 -d ghcr.io/dyrector-io/darklens:latest`
* Persist data: `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -v darklens-data:/var/lib/darklens -n darklens -d ghcr.io/dyrector-io/darklens:latest`
* Use secure agents: `docker run -p 8000:8000 -p 5000:5000 -n darklens -d ghcr.io/dyrector-io/darklens:latest`
* Note: This requires HTTPS termination using Traefik or NGINX

## Agent install
Expand Down
8 changes: 8 additions & 0 deletions web/frontend/src/hooks/use-backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ const handleFetch = <TRes>(opts: HandleFetchOptions) => {
ok: false,
})
})
.catch(() => {
toast(t('oops'))
nav(ROUTE_STATUS)

resolve({
ok: false,
})
})
} catch (err) {
if (err.status === 401) {
nav(ROUTE_LOGIN)
Expand Down

0 comments on commit e31827f

Please sign in to comment.