This commit is contained in:
@@ -13,9 +13,9 @@ FROM alpine:3.20
|
|||||||
|
|
||||||
# HTTPS-Callouts in Alpine brauchen ca-certificates
|
# HTTPS-Callouts in Alpine brauchen ca-certificates
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
|
RUN mkdir /data
|
||||||
COPY --from=builder /bin/sctradingtool /bin/sctradingtool
|
COPY --from=builder /bin/sctradingtool /bin/sctradingtool
|
||||||
COPY ./static /bin/static
|
COPY ./static /data/static
|
||||||
|
|
||||||
# Default listens on :8080 – siehe main.go
|
# Default listens on :8080 – siehe main.go
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
2
main.go
2
main.go
@@ -90,7 +90,7 @@ func main() {
|
|||||||
|
|
||||||
createTable(db)
|
createTable(db)
|
||||||
|
|
||||||
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("/data/static"))))
|
||||||
|
|
||||||
http.HandleFunc("/login", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/login", func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method == http.MethodPost {
|
if r.Method == http.MethodPost {
|
||||||
|
Reference in New Issue
Block a user