mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
add version and cli customization
This commit is contained in:
@@ -20,12 +20,12 @@ RUN apk add --no-cache \
|
||||
unzip \
|
||||
ca-certificates
|
||||
|
||||
COPY --from=builder /server /
|
||||
COPY --from=builder /beszel /
|
||||
|
||||
COPY ./site/dist /site/dist
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT [ "/server" ]
|
||||
ENTRYPOINT [ "/beszel" ]
|
||||
|
||||
CMD ["serve", "--http=0.0.0.0:8080"]
|
5
main.go
5
main.go
@@ -28,11 +28,16 @@ import (
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
var Version = "0.0.1-alpha.0"
|
||||
|
||||
var app *pocketbase.PocketBase
|
||||
var serverConnections = make(map[string]Server)
|
||||
|
||||
func main() {
|
||||
app = pocketbase.New()
|
||||
app.RootCmd.Version = Version
|
||||
app.RootCmd.Use = "beszel"
|
||||
app.RootCmd.Short = ""
|
||||
|
||||
// loosely check if it was executed using "go run"
|
||||
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
|
||||
|
Reference in New Issue
Block a user