From 7872195d610d4a11152f20b0014b455bf5d3c641 Mon Sep 17 00:00:00 2001 From: Nathan Date: Sun, 15 Jan 2023 03:22:53 +0000 Subject: [PATCH] adding resources --- Dockerfile | 4 ++-- main.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 595a876..fab22da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,12 @@ RUN CGO_ENABLED=1 go build --ldflags '-linkmode external -extldflags=-static' #RUN go build . RUN mkdir -p /usr/src/app/work/ RUN cp /usr/src/app/rgb/rgb /usr/src/app/work/rgb -RUN cp /usr/src/app/rgb/mario* /usr/src/app/work/ +#RUN cp /usr/src/app/rgb/mario* /usr/src/app/work/ FROM scratch COPY --from=builder /usr/src/app/rgb/rgb /usr/src/app/work/ - +COPY --from=builder /usr/src/app/rgb/mari* /usr/src/app/work/ diff --git a/main.go b/main.go index 04fb585..8689ee2 100644 --- a/main.go +++ b/main.go @@ -80,6 +80,7 @@ func listener(mqMessages chan mqtt.Message) { client := MQTT.NewClient(opts) topic := "home/rgbboard" if token := client.Connect(); token.Wait() && token.Error() != nil { + log.Println(fmt.Sprintf("failed to connect to mq: %s", token.Error().Error())) panic(token.Error()) } client.Subscribe(topic, 0, func(client mqtt.Client, msg mqtt.Message) {