add compiling info and tutoriel en français to readme

This commit is contained in:
Henry Dollman
2024-07-27 18:37:02 -04:00
parent 463681e145
commit 3dafb8ddd5

View File

@@ -28,7 +28,7 @@ The agent runs on each system you want to monitor. It creates a minimal SSH serv
## Getting started ## Getting started
If using the binary instead of docker, ignore 4-5 and run the agent using the binary instead. If not using docker, ignore 4-5 and run the agent using the binary instead.
1. Start the hub (see [installation](#installation)). The binary command is `beszel serve`. 1. Start the hub (see [installation](#installation)). The binary command is `beszel serve`.
2. Open http://localhost:8090 and create an admin user. 2. Open http://localhost:8090 and create an admin user.
@@ -39,6 +39,10 @@ If using the binary instead of docker, ignore 4-5 and run the agent using the bi
If all goes well, you should see the system flip to green. If it goes red, check the Logs page, and see [troubleshooting tips](#faq--troubleshooting). If all goes well, you should see the system flip to green. If it goes red, check the Logs page, and see [troubleshooting tips](#faq--troubleshooting).
### Tutoriel en français
Pour le tutoriel en français, consultez https://belginux.com/installer-beszel-avec-docker/
## Installation ## Installation
You may choose to install the hub and agent as single binaries, or as docker images. You may choose to install the hub and agent as single binaries, or as docker images.
@@ -257,6 +261,49 @@ Records for longer time periods are made by averaging stats from the shorter tim
If you pause / unpause the agent for longer than one minute, the data will be incomplete and the timing for the current interval will reset. If you pause / unpause the agent for longer than one minute, the data will be incomplete and the timing for the current interval will reset.
## Compiling
Both the hub and agent are written in Go, so you can easily build them yourself, or cross-compile for different platforms. Please [install Go](https://go.dev/doc/install) first if you haven't already.
### Agent
```bash
cd agent
# prepare / install dependencies
go mod tidy
# create a binary in the current directory
CGO_ENABLED=0 go build -ldflags "-w -s" .
```
### Hub
The hub embeds the web UI in the binary, so you must build the website first. I use [Bun](https://bun.sh/), but you may use Node.js if you prefer:
```bash
cd hub/site
bun install
bun run build
```
Then back in the hub directory:
```bash
go mod tidy
CGO_ENABLED=0 go build -ldflags "-w -s" .
```
### Cross-compiling
You can cross-compile for different platforms using the `GOOS` and `GOARCH` environment variables.
For example, to build for Linux ARM64:
```bash
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-w -s" .
```
You can see a list of valid options by running `go tool dist list`.
<!-- <!--
## Support ## Support