fix
All checks were successful
build-binaries / build (, amd64, linux) (push) Has been skipped
build-binaries / build (, arm64, linux) (push) Has been skipped
build-binaries / build (, arm, 7, linux) (push) Has been skipped
build-binaries / build (.exe, amd64, windows) (push) Has been skipped
build-binaries / release (push) Has been skipped
release-tag / release-image (push) Successful in 2m8s

This commit is contained in:
2025-10-25 14:32:53 +02:00
parent dd19c79aee
commit 284ba4bdd8
2 changed files with 3 additions and 3 deletions

View File

@@ -13,9 +13,8 @@ VOLUME ["/data"]
EXPOSE 8080 EXPOSE 8080
ENV API_TOKEN="" \ ENV API_TOKEN="" \
HTTP_PUBLIC=":8080" \ HTTP_PUBLIC=":8080" \
MANIFEST_PATH="/data" \ MANIFEST_PATH="/data/manifest.json" \
APP_VENDOR="YourVendor" \ APP_VENDOR="YourVendor" \
APP_PRODUCT="YourProduct" APP_PRODUCT="YourProduct"
COPY --from=build /out/release-agent /release-agent COPY --from=build /out/release-agent /release-agent
ENTRYPOINT ["/release-agent"] ENTRYPOINT ["/release-agent"]

View File

@@ -589,7 +589,7 @@ func main() {
manifestPath := envOr("MANIFEST_PATH", "/data/manifest.json") manifestPath := envOr("MANIFEST_PATH", "/data/manifest.json")
vendor := envOr("APP_VENDOR", "YourVendor") vendor := envOr("APP_VENDOR", "YourVendor")
product := envOr("APP_PRODUCT", "YourProduct") product := envOr("APP_PRODUCT", "YourProduct")
token := os.Getenv("API_TOKEN") // optional; if set, required for POST token := envOr("API_TOKEN", "") // optional; if set, required for POST
st := newStore(manifestPath, vendor, product) st := newStore(manifestPath, vendor, product)
if err := st.loadIfExists(); err != nil { if err := st.loadIfExists(); err != nil {
@@ -611,6 +611,7 @@ func main() {
http.HandleFunc("/v1/publish", srv.handlePublish) http.HandleFunc("/v1/publish", srv.handlePublish)
http.HandleFunc("/v1/config", srv.handleConfig) http.HandleFunc("/v1/config", srv.handleConfig)
fmt.Println(addr, manifestPath, vendor, product, token)
log.Printf("agent listening on %s (admin UI at /admin)", addr) log.Printf("agent listening on %s (admin UI at /admin)", addr)
log.Fatal(http.ListenAndServe(addr, nil)) log.Fatal(http.ListenAndServe(addr, nil))
} }