From 7bcaf2a79ab5e96244c3a81de699211e5eb0b33e Mon Sep 17 00:00:00 2001 From: boyska Date: Tue, 13 Nov 2018 14:50:03 +0100 Subject: [PATCH] FIX templates in docker --- Dockerfile | 1 + panelui/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 17f5e68..8e8b12a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,5 @@ FROM busybox WORKDIR /usr/bin/ COPY --from=builder /go/bin/panelcli /usr/bin/ COPY --from=builder /go/bin/userpanel /usr/bin/ +COPY panelui/res/ /go/src/git.lattuga.net/boyska/feedpanel/panelui/res/ ENTRYPOINT ["./userpanel"] diff --git a/panelui/main.go b/panelui/main.go index 09fdc5b..0bfd1a9 100644 --- a/panelui/main.go +++ b/panelui/main.go @@ -24,6 +24,6 @@ func GetMux() *http.ServeMux { templateExecute(w, r, "home.html", templates, map[string]interface{}{"User": user}) }) - mux.HandleFunc("/static", static.HTTPBox()) + mux.Handle("/static", http.FileServer(static.HTTPBox())) return mux }