Skip to content

Commit c754aeb

Browse files
committed
Update dependencies, fix typos, adds SHA256 sum
1 parent feb3ea5 commit c754aeb

File tree

6 files changed

+41
-24
lines changed

6 files changed

+41
-24
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ jobs:
134134
135135
# List created archives
136136
ls -la *.tar.gz
137+
138+
sha256sum fail2ban-dashboard-${{ github.event.release.tag_name }}-linux-amd64.tar.gz >> SHA256SUMS
137139
138140
- uses: softprops/action-gh-release@v2
139141
with:
@@ -147,10 +149,6 @@ jobs:
147149
Docker images are available at:
148150
- **Tagged version**: `ghcr.io/${{ github.repository_owner }}/fail2ban-dashboard:${{ github.event.release.tag_name }}`
149151
- **Latest version**: `ghcr.io/${{ github.repository_owner }}/fail2ban-dashboard:latest`
150-
151-
### Usage
152-
```bash
153-
docker pull ghcr.io/${{ github.repository_owner }}/fail2ban-dashboard:${{ github.event.release.tag_name }}
154-
docker run --user=root -v /var/run/fail2ban/fail2ban.sock:/var/run/fail2ban/fail2ban.sock:ro -p 3000:3000 ghcr.io/${{ github.repository_owner }}/fail2ban-dashboard:${{ github.event.release.tag_name }}
155-
```
156-
files: "fail2ban-dashboard-${{ github.event.release.tag_name }}-linux-amd64.tar.gz"
152+
files: |
153+
"fail2ban-dashboard-${{ github.event.release.tag_name }}-linux-amd64.tar.gz"
154+
"SHA256SUMS"

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ MAIN_PATH := ./cmd/fail2ban-dashboard
1111
all: test build
1212

1313
# Build the application
14-
build:
14+
build: clean
1515
@echo "Building $(BINARY_NAME) version $(VERSION) ($(GIT_HASH))"
1616
@mkdir -p $(BIN_DIR)
1717
GOOS=linux GOARCH=amd64 go build \
1818
-ldflags="-s -w -X 'main.Version=$(VERSION)' -X 'main.GitHash=$(GIT_HASH)'" \
1919
-o $(BIN_DIR)/$(BINARY_NAME) $(MAIN_PATH)
20+
cd $(BIN_DIR) && sha256sum $(BINARY_NAME) >> SHA256SUMS
2021

2122
# Run tests
2223
test:

README.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Environment variables can be used to set parameters without using command line f
117117
When started, check http://127.0.0.1:3000/
118118

119119
Basic authentication can be enabled with the `--auth-user` and/or `--auth-password` flags.
120-
When only `--auth-user` is provided, the password will be generated and show in the logs/console.
120+
When only `--auth-user` is provided, the password will be generated and shown in the logs/console.
121121
When only `--auth-password` is provided, the user will be named `admin`.
122122

123123
### Metrics
@@ -156,20 +156,32 @@ fail2ban_dashboard_info{fail2ban_version="1.1.0",version="development"} 1
156156

157157
## Building the application
158158

159+
### Requirements
160+
161+
To build the application, the Go version specificed in the `go.mod` file must be installed.
162+
Furthermore, the `make` utility must be installed.
163+
164+
### Building
165+
159166
To build the application, use make with the following options:
160167

161168
```
162-
make
163-
164-
build - Build the application
165-
166-
test - Run tests
167-
168-
clean - Remove build artifacts
169-
170-
help - Show this help message
171-
172-
all - Run tests and build the application (default)
169+
> make help
170+
171+
Available targets:
172+
all - Run tests and build the application (default)
173+
test - Run tests
174+
build - Build the application
175+
clean - Remove build artifacts
176+
help - Show this help message
177+
178+
Variables:
179+
VERSION - Version to embed in binary (default: development)
180+
181+
Examples:
182+
make build
183+
make build VERSION=v1.0.0
184+
make clean
173185
174186
```
175187

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/webishdev/fail2ban-dashboard
33
go 1.26.0
44

55
require (
6-
github.com/gofiber/fiber/v2 v2.52.11
6+
github.com/gofiber/fiber/v2 v2.52.12
77
github.com/kisielk/og-rek v1.3.0
88
github.com/nlpodyssey/gopickle v0.3.0
99
github.com/prometheus/client_golang v1.23.2
@@ -23,11 +23,11 @@ require (
2323
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
2424
github.com/google/uuid v1.6.0 // indirect
2525
github.com/inconshreveable/mousetrap v1.1.0 // indirect
26-
github.com/klauspost/compress v1.18.3 // indirect
26+
github.com/klauspost/compress v1.18.4 // indirect
2727
github.com/kylelemons/godebug v1.1.0 // indirect
2828
github.com/mattn/go-colorable v0.1.14 // indirect
2929
github.com/mattn/go-isatty v0.0.20 // indirect
30-
github.com/mattn/go-runewidth v0.0.19 // indirect
30+
github.com/mattn/go-runewidth v0.0.20 // indirect
3131
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3232
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
3333
github.com/prometheus/common v0.66.1 // indirect

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPE
2121
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
2222
github.com/gofiber/fiber/v2 v2.52.11 h1:5f4yzKLcBcF8ha1GQTWB+mpblWz3Vz6nSAbTL31HkWs=
2323
github.com/gofiber/fiber/v2 v2.52.11/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
24+
github.com/gofiber/fiber/v2 v2.52.12 h1:0LdToKclcPOj8PktUdIKo9BUohjjwfnQl42Dhw8/WUw=
25+
github.com/gofiber/fiber/v2 v2.52.12/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
2426
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
2527
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
2628
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@@ -31,6 +33,8 @@ github.com/kisielk/og-rek v1.3.0 h1:lTXdQXqFETZKA//FWH4RBNAuiJ/dofxIwHAidoUZoMk=
3133
github.com/kisielk/og-rek v1.3.0/go.mod h1:4at7oxyfBTDilURhNCf7irHWtosJlJl9uyqUqAkrP4w=
3234
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=
3335
github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
36+
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
37+
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
3438
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
3539
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
3640
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -43,6 +47,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
4347
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
4448
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
4549
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
50+
github.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ=
51+
github.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
4652
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
4753
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
4854
github.com/nlpodyssey/gopickle v0.3.0 h1:BLUE5gxFLyyNOPzlXxt6GoHEMMxD0qhsE4p0CIQyoLw=

metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func setupRegistry() *metrics {
5555
bannedSumMetrics: prometheus.NewGauge(
5656
prometheus.GaugeOpts{
5757
Name: "f2b_banned_total",
58-
Help: "The total number of banned addressees",
58+
Help: "The total number of banned addresses",
5959
},
6060
),
6161
jailBannedCurrentMetrics: prometheus.NewGaugeVec(

0 commit comments

Comments
 (0)