Dockerfile aktualisiert

main.go funktion entfernt
This commit is contained in:
Domenik Rath 2025-01-12 12:47:29 +01:00
parent 6a468cd718
commit 299cadb278
2 changed files with 4 additions and 8 deletions

View File

@ -29,6 +29,8 @@ COPY --from=builder /app/ek-suche /app/ek-suche
# Kopiere die index.html und den public-Ordner vom Builder
COPY --from=builder /app/index.html /app/index.html
COPY --from=builder /app/popup.html /app/popup.html
COPY --from=builder /app/public/ /app/public/
# Stelle sicher, dass die Anwendung ausführbar ist

10
main.go
View File

@ -76,15 +76,9 @@ func handleFavicon(w http.ResponseWriter, r *http.Request) {
}
func handlePopupInstructions(w http.ResponseWriter, r *http.Request) {
tmpl, err := template.ParseFiles("popup.html")
if err != nil {
log.Printf("Fehler beim Parsen des Templates: %v", err)
http.Error(w, "Interner Serverfehler", http.StatusInternalServerError)
return
}
tmpl := template.Must(template.ParseFiles("popup.html"))
if err := tmpl.Execute(w, nil); err != nil {
log.Printf("Fehler beim Ausführen des Templates: %v", err)
http.Error(w, "Interner Serverfehler", http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}