* migrate golangci-lint to v2 and update go version - migrated .golangci.yml to version 2 format - updated go.mod from 1.23.0 to 1.24 - removed deprecated run.timeout configuration * update to go 1.25 and baseimage v1.17.0 - updated go.mod to go 1.25 - updated Dockerfile to use buildgo-v1.17.0 (go 1.25.0) - updated Dockerfile to use app-v1.17.0 * fix flaky tests with proper synchronization - use assert.Eventually instead of fixed sleep in TestService_Many - wait for webhook before shutdown in TestMain_WithWebhook - fixes race conditions exposed by Go 1.25 scheduler changes * fix data race in MockDest.closed field - add IsClosed() method with proper locking - add locking to String() method - use IsClosed() in tests instead of direct field access - fixes race condition detected by go test -race * update example go.mod to go 1.25 * update golangci-lint to v2.6.0 for go 1.25 support * fix linter issue and update CLAUDE.md - merge conditional assignment in example accessor/data.go - add reminder in CLAUDE.md to always test and lint examples before committing * update example Dockerfile to baseimage v1.17.0 for go 1.25
30 lines
1.1 KiB
Docker
30 lines
1.1 KiB
Docker
FROM umputun/baseimage:buildgo-v1.17.0 AS build-backend
|
|
|
|
ADD backend /build/backend
|
|
WORKDIR /build/backend/_example/memory_store
|
|
|
|
RUN go build -o /build/bin/memory_store -ldflags "-X main.revision=0.0.0 -s -w"
|
|
|
|
FROM umputun/baseimage:app-v1.17.0
|
|
|
|
ARG GITHUB_SHA
|
|
|
|
LABEL org.opencontainers.image.authors="Umputun <umputun@gmail.com>" \
|
|
org.opencontainers.image.description="Remark42 comment engine example JRPC memory store" \
|
|
org.opencontainers.image.documentation="https://github.com/umputun/remark42/tree/master/backend/_example/memory_store" \
|
|
org.opencontainers.image.licenses="MIT" \
|
|
org.opencontainers.image.source="https://github.com/umputun/remark42" \
|
|
org.opencontainers.image.title="Remark42 JRPC example memory store" \
|
|
org.opencontainers.image.url="https://remark42.com/" \
|
|
org.opencontainers.image.revision="${GITHUB_SHA}"
|
|
|
|
WORKDIR /srv
|
|
COPY --from=build-backend /build/bin/memory_store /srv/memory_store
|
|
RUN chown -R app:app /srv
|
|
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=30s --timeout=3s CMD curl --fail http://localhost:8080/ping || exit 1
|
|
USER app
|
|
|
|
CMD ["/srv/memory_store"]
|