This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

replica / Dockerfile
957 B 37 lines
1# syntax=docker/dockerfile:1 2 3# Build stage: CGO is required for the mattn/go-sqlite3 driver. 4FROM golang:1.26-alpine3.22 AS build 5 6RUN apk add --no-cache gcc musl-dev 7 8WORKDIR /src 9 10# Cache module downloads separately from source changes. 11COPY go.mod go.sum ./ 12RUN go mod download 13 14COPY . . 15RUN CGO_ENABLED=1 go build -trimpath -ldflags="-s -w" -o /out/replica ./cmd 16 17# Runtime stage. 18FROM alpine:3.22 19 20RUN apk add --no-cache ca-certificates tzdata wget \ 21 && adduser -D -u 10001 replica 22 23COPY --from=build /out/replica /usr/local/bin/replica 24 25# Single volume holding both the sqlite DB and the CAR data dir 26# (paths configured via REPLICA_DATABASE_URL / REPLICA_DATA_DIR). 27RUN mkdir -p /data && chown replica:replica /data 28VOLUME /data 29 30USER replica 31 32EXPOSE 9091 33 34HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ 35 CMD wget -q -O /dev/null http://localhost:9091/_health || exit 1 36 37ENTRYPOINT ["/usr/local/bin/replica", "run"]