From b7c2f7a9518d7b6bc35ffe0612980d7edfc80cfe Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sat, 12 Aug 2023 09:45:35 +0100 Subject: [PATCH] Remove superfluous output to console --- Dockerfile | 2 +- run/server.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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)