https://github.com/dyrector-io/darklens
Lightweight container viewer.
https://github.com/dyrector-io/darklens
container docker hacktoberfest
Last synced: about 1 month ago
JSON representation
Lightweight container viewer.
- Host: GitHub
- URL: https://github.com/dyrector-io/darklens
- Owner: dyrector-io
- License: apache-2.0
- Created: 2023-10-02T10:30:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-25T08:59:09.000Z (over 1 year ago)
- Last Synced: 2025-04-11T04:11:55.990Z (about 1 month ago)
- Topics: container, docker, hacktoberfest
- Language: TypeScript
- Homepage:
- Size: 2.37 MB
- Stars: 26
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
![]()
docker logs and docker inspect in an easy to use GUI
## Use cases
- **SSH-less Container Monitoring:** You can add as many components of your infrastructure as you like, and check up on the services running in one place without SSH access.
- **Centralized View for Container Management:** One user-friendly interface to analyze logs and container configs.
- **Goodbye JSON (Hello UI):** Quickly interpretable UI to spare you from untangling data in JSON about your containers.## Getting started
1. Enter `docker run -p 8000:8000 -p 5000:5000 --name darklens -d ghcr.io/dyrector-io/darklens:latest` in terminal
2. Open `localhost:8000` in browser
3. Enjoy!## Settings
Settings provides various configuration options for running darklens, tailor your darklens deployment to your needs with these settings.
#### Start without Authorization
Launch Darklens without any authentication or authorization checks. Ideal for quick testing and development.
`docker run -p 8000:8000 -p 5000:5000 -e DISABLE_AUTH=true --name darklens -d ghcr.io/dyrector-io/darklens:latest`
#### Select a stronger JWT secret
Enhance security by specifying a custom JWT secret for authentication.
`docker run -p 8000:8000 -p 5000:5000 -e JWT_SECRET=supersecret --name darklens -d ghcr.io/dyrector-io/darklens:latest`
#### Run on a public domain
Configure darklens to run on a public domain with options for specifying a public URL and agent address.
`docker run -p 8000:8000 -p 5000:5000 -e PUBLIC_URL=example.com AGENT_ADDRESS=example.com:5000 --name darklens -d ghcr.io/dyrector-io/darklens:latest`
> Note: Agents require gRPC port 5000 to connect to the service
#### Persist data
Ensure data persistence by using Docker volumes to store Darklens data.
`docker run -p 8000:8000 -p 5000:5000 -v darklens-data:/var/lib/darklens --name darklens -d ghcr.io/dyrector-io/darklens:latest`
## Agent install
1. Click on the empty card with a plus icon to add a new node
2. Enter a name for your node and click Save
- This'll be the name of the agent running as a container on your node
3. On the right side of the screen, select whether you'd like to install the agent with a Shell (UNIX) or a PowerShell (Windows) script> Note: Shell scripts might not work on Windows using Git Bash.
4. Generate the script and copy & paste it into Shell or PowerShell. Press enter to install the agent
5. When node status turns green, you're ready to use darklens> Note: Agents connect to the host defined in their JWT token (`GRPC_TOKEN` environment), by default the `AGENT_ADDRESS` backend environment variable is used, but users can override this value on the UI.
## Development
1. Setup backend
1. Go to `web/backend`
2. Run `npm i`
3. Copy `.env.example` to `.env`2. Setup frontend
1. Go to `web/frontend`
2. Run `npm i`
3. Copy `.env.example` to `.env`3. Setup development Traefik
1. Go to `web`
2. Run `docker compose -f docker-compose.dev.yaml up`4. Develop
1. Go to `web/backend` and run `npx prisma migrate dev` to apply migrations then start using `npm start`
2. Go to `web/frontend` and run `npm start`
3. The app will be available on `localhost:8000`> Make sure the `dev-traefik` container is running as it routes the traffic between the frontend and the backend
## Contact us
If you experience any issues, feel free to reach out to us on [Discord](https://discord.gg/pZWbd4fxga).