Files
Anya Tokugawa 61ecd1ffbd
Build and publish container images / images (push) Successful in 10m42s
ci: isolate temporary test databases from runner overlay I/O
2026-11-08 06:08:09 +09:00

28 lines
785 B
Docker

FROM golang:1.25-alpine AS source
WORKDIR /src
RUN apk add --no-cache ca-certificates git ffmpeg poppler-utils 7zip xz
COPY go.mod go.sum ./
RUN go mod download
COPY . .
FROM source AS test
# Test packages create independent SQLite stores. Serialize packages to avoid
# concurrent server/store initialization exhausting the shared runner's I/O.
# Keep production database deadlines and the complete test suite unchanged.
# Temporary test databases use bounded RAM-backed storage rather than the
# runner's overlay filesystem. Compiler temporary files remain on disk.
RUN --mount=type=tmpfs,target=/test-tmp,size=2147483648 \
TMPDIR=/test-tmp GOTMPDIR=/tmp go test -p 1 ./...
FROM source AS runtime
RUN go build -o /pageswiki ./cmd/pageswiki
EXPOSE 8081
CMD ["/pageswiki"]