Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
24 lines
667 B
Docker
24 lines
667 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
RUN apk add --no-cache git ca-certificates sqlite-dev gcc musl-dev
|
|
|
|
WORKDIR /build
|
|
COPY . .
|
|
|
|
# Build the basic-sqlite example
|
|
RUN cd examples/basic-sqlite3 && \
|
|
go mod tidy && \
|
|
CGO_ENABLED=1 go build -o khatru-sqlite .
|
|
|
|
FROM alpine:latest
|
|
RUN apk --no-cache add ca-certificates sqlite wget
|
|
WORKDIR /app
|
|
COPY --from=builder /build/examples/basic-sqlite3/khatru-sqlite /app/
|
|
RUN mkdir -p /data
|
|
EXPOSE 8080
|
|
ENV DATABASE_PATH=/data/khatru.db
|
|
ENV PORT=8080
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD wget --quiet --tries=1 --spider http://localhost:8080 || exit 1
|
|
CMD ["/app/khatru-sqlite"]
|