diff --git a/Dockerfile b/Dockerfile index aea5f49..77a76b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ WORKDIR /build COPY . . RUN go build -FROM scratch +FROM alpine:latest COPY --from=builder /build/map-dots /bin/map-dots CMD [ "/bin/map-dots", "--server" ] \ No newline at end of file diff --git a/run/server.go b/run/server.go index ce7e517..35dd093 100644 --- a/run/server.go +++ b/run/server.go @@ -22,7 +22,7 @@ func Server() { http.HandleFunc("/traccar/", handleTraccarRequest) http.HandleFunc("/help/", handleHelpRequest) - serverAddr := "localhost:8198" // Set your desired server address + serverAddr := ":8198" // Set your desired server address fmt.Printf("Starting server on http://%s\n", serverAddr) log.Msg.Info("Starting server on http://" + serverAddr) err := http.ListenAndServe(serverAddr, nil) @@ -58,10 +58,6 @@ func handleTraccarRequest(w http.ResponseWriter, r *http.Request) { ) } else { log.Msg.Debug("Position data fetched") - for _, loc := range locations { - fmt.Printf("Latitude: %.7f, Longitude: %.7f, Speed: %d, Altitude: %.4f\n", - loc.Latitude, loc.Longitude, loc.Speed, loc.Altitude) - } } img := imaging.Generate(height, width, style, locations)