outposts: release binary outposts (#1954)
* outposts/proxy: always embed static assets, still check local Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: add initial ci to build outpost as binary Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: fix typo, build web Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: upload to release on publish, only run linux on ci Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: ensure latest go is used Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * ci: split e2e tests into two halves Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -1,9 +1,14 @@
|
||||
package web
|
||||
|
||||
import _ "embed"
|
||||
import (
|
||||
_ "embed"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//go:embed robots.txt
|
||||
var RobotsTxt []byte
|
||||
|
||||
//go:embed security.txt
|
||||
var SecurityTxt []byte
|
||||
|
||||
var StaticHandler = http.FileServer(http.Dir("./web/dist/"))
|
||||
|
||||
19
web/static_outpost.go
Normal file
19
web/static_outpost.go
Normal file
@ -0,0 +1,19 @@
|
||||
//go:build outpost_static_embed
|
||||
// +build outpost_static_embed
|
||||
|
||||
package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//go:embed dist/*
|
||||
var StaticDist embed.FS
|
||||
|
||||
//go:embed authentik
|
||||
var StaticAuthentik embed.FS
|
||||
|
||||
func init() {
|
||||
StaticHandler = http.FileServer(http.FS(StaticDist))
|
||||
}
|
||||
Reference in New Issue
Block a user