Initial MVP commit

This commit is contained in:
Tony Blyler 2024-09-28 16:20:24 -04:00
commit 7bcf16a1d4
No known key found for this signature in database
24 changed files with 2781 additions and 0 deletions

19
Containerfile Normal file
View file

@ -0,0 +1,19 @@
FROM docker.io/golang:1.23 AS builder
RUN apt-get update && apt-get install -y libsystemd-dev
WORKDIR /goatcounter-systemd/
COPY ./ /goatcounter-systemd/
ENV GOCACHE="/go/pkg/mod"
RUN --mount=type=cache,target="/go/pkg/mod" go build \
-o /usr/local/bin/goatcounter-systemd
FROM docker.io/debian:stable-slim
COPY --from=builder /usr/local/bin/goatcounter-systemd /usr/local/bin/goatcounter-systemd
USER nobody
ENTRYPOINT [ "/usr/local/bin/goatcounter-systemd" ]