Skip to content

Commit

Permalink
fix: format & insecure agents
Browse files Browse the repository at this point in the history
  • Loading branch information
robot9706 committed Oct 6, 2023
1 parent bc273fd commit a180280
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@

## Getting started

1. Enter `docker run -p 8000:8000 -d ghcr.io/dyrector-io/darklens:latest` in terminal
1. Enter `docker run -p 8000:8000 -p 5000:5000 -e AGENT_INSECURE=true -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 DISABLE_AUTH=true -d ghcr.io/dyrector-io/darklens:latest`
* Select a stronger JWT secret: `docker run -p 8000:8000 -p 5000:5000 -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 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 -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`
* Note: Agents require gRPC port 5000 to connect to the service
* Persist data: `docker run -p 8000:8000 -p 5000:5000 -v darklens-data:/var/lib/darklens -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 -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`
* Note: This requires HTTPS termination using Traefik or NGINX

## Agent install

Expand Down
2 changes: 1 addition & 1 deletion web/backend/src/domain/agent-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class AgentInstaller {
const configLocalDeploymentNetwork = this.configService.get<string>('LOCAL_DEPLOYMENT_NETWORK')
const disableForcePull = this.configService.get<boolean>('AGENT_INSTALL_SCRIPT_DISABLE_PULL', false)
const agentImageTag = this.configService.get<string>('AGENT_IMAGE', getAgentVersionFromPackage(this.configService))
const debugMode = process.env.NODE_ENV !== PRODUCTION
const debugMode = process.env.NODE_ENV !== PRODUCTION || this.configService.get<boolean>('AGENT_INSECURE', false)

const installScriptParams: InstallScriptConfig = {
name: this.node.name.toLowerCase().replace(/\s/g, ''),
Expand Down

0 comments on commit a180280

Please sign in to comment.