fix: use pre-built golangci-lint binary, fix NATS healthcheck

This commit is contained in:
sam committed 2026-07-22 10:56:06 +10:00
1 parent cac64bcea6
commit 3490bd4124
2 files changed
+6 -3

No files matched your search

+5 -2
View File
@@ -41,8 +41,11 @@ RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/go"
# Pre-install common Go tools that need a Go toolchain.
RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest && \
# Pre-install common Go tools. Use pre-built binaries to avoid
# compiling from source (golangci-lint is a large CGO build).
ARG GOLANGCI_LINT_VERSION=v2.12.2
RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" \
| tar -xz -C /usr/local/bin --strip-components=1 "golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint" && \
go install mvdan.cc/gofumpt@latest && \
rm -rf /go/pkg/mod/cache
+1 -1
View File
@@ -16,7 +16,7 @@ services:
- nats_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "nats", "server", "check", "-s", "nats://localhost:4222"]
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8222/healthz"]
interval: 10s
timeout: 5s
retries: 5