From 56f96c4a7a6fda2eaf97b1cf5927ce225a73efd1 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Thu, 19 Mar 2026 20:58:01 -0500 Subject: [PATCH] Bugfix to accommodate private upstream repository for feedapi --- Dockerfile | 12 ++++++------ go.mod | 4 ---- go.sum | 4 ++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31e8d6a..d75358c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,8 @@ ARG GO_VERSION=1.25 FROM harbor.maximumdirect.net/proxy-dockerhub/golang:${GO_VERSION}-bookworm AS build WORKDIR /src +ENV GOPRIVATE=gitea.maximumdirect.net/ejr/* \ + GONOSUMDB=gitea.maximumdirect.net/ejr/* # Install baseline packages RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -17,15 +19,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Cache dependencies first COPY go.mod go.sum ./ RUN --mount=type=cache,target=/go/pkg/mod \ - go mod download + go mod download && go mod verify # Copy the rest of the source COPY . . -# Ensure go.sum is complete after dropping the replace -RUN --mount=type=cache,target=/go/pkg/mod \ - --mount=type=cache,target=/root/.cache/go-build - # Default to a static build (no CGO) # If errors, can build with: --build-arg CGO_ENABLED=1 ARG CGO_ENABLED=0 @@ -71,8 +69,10 @@ RUN useradd \ # Copy the binary COPY --chown=weatherapi:weatherapi --from=build /out/weatherapi /weatherapi/weatherapi +COPY --chown=weatherapi:weatherapi config.yml /weatherapi/config.yml +COPY --chown=weatherapi:weatherapi templates /weatherapi/templates USER weatherapi # The application expects config.yml in the same directory as the binary -ENTRYPOINT ["/weatherapi/weatherapi"] \ No newline at end of file +ENTRYPOINT ["/weatherapi/weatherapi"] diff --git a/go.mod b/go.mod index 1dadf76..74bc188 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,3 @@ require ( ) require gopkg.in/yaml.v3 v3.0.1 // indirect - -replace gitea.maximumdirect.net/ejr/feedapi => ../feedapi - -replace gitea.maximumdirect.net/ejr/weatherfeeder => ../weatherfeeder diff --git a/go.sum b/go.sum index c95a75b..64fef22 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,7 @@ +gitea.maximumdirect.net/ejr/feedapi v0.1.0 h1:ZB5QWKD5DPFV3P7vyeJqXPMcSWN9qHkDUHw1LgN9hwY= +gitea.maximumdirect.net/ejr/feedapi v0.1.0/go.mod h1:3fIaFFx4ywt0TWbN8DIIBAHJn7ZQUm6PNcceqRgy3bw= +gitea.maximumdirect.net/ejr/weatherfeeder v0.7.2 h1:GJdZ9x54HLTPidPGhD/dmq7efvGjBltK1ywCIRU1w6c= +gitea.maximumdirect.net/ejr/weatherfeeder v0.7.2/go.mod h1:P7rP7XftJjBFzNEIkAiX+z2YqXOtnZjy3BaF6kX+sO4= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=