Use env templates
This commit is contained in:
parent
bcdb16bc6e
commit
59fcb1fc47
|
@ -1,5 +1,8 @@
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
RUN apt-get -y update && apt-get install -y ca-certificates
|
RUN apt-get -y update && apt-get install -y ca-certificates
|
||||||
|
RUN ["mkdir", "/usr/share/eksterd"]
|
||||||
ADD ./eksterd /usr/local/bin
|
ADD ./eksterd /usr/local/bin
|
||||||
|
ADD ./templates /usr/share/eksterd
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
ENV EKSTER_TEMPLATES "/usr/share/eksterd"
|
||||||
ENTRYPOINT ["/usr/local/bin/eksterd"]
|
ENTRYPOINT ["/usr/local/bin/eksterd"]
|
||||||
|
|
|
@ -114,7 +114,10 @@ func (h *mainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
t, err := template.ParseFiles("templates/index.html", "templates/settings.html")
|
t, err := template.ParseFiles(
|
||||||
|
os.Getenv("EKSTER_TEMPLATES")+"/templates/index.html",
|
||||||
|
os.Getenv("EKSTER_TEMPLATES")+"/templates/settings.html",
|
||||||
|
)
|
||||||
|
|
||||||
var page indexPage
|
var page indexPage
|
||||||
page.Session = sess
|
page.Session = sess
|
||||||
|
|
Loading…
Reference in New Issue
Block a user