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