Compare commits

..

No commits in common. "main" and "1.2.3" have entirely different histories.
main ... 1.2.3

6 changed files with 29 additions and 39 deletions

View file

@ -8,10 +8,6 @@ updates:
day: "friday"
time: "09:00"
timezone: "Europe/Berlin"
groups:
gomod:
patterns:
- "*"
- package-ecosystem: "docker"
directory: "/"
@ -28,7 +24,3 @@ updates:
day: "friday"
time: "09:00"
timezone: "Europe/Berlin"
groups:
github-actions:
patterns:
- "*"

View file

@ -14,12 +14,12 @@ jobs:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@v4
with:
go-version: "1.17.x"
- name: Cache Go Dependencies
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
@ -43,12 +43,12 @@ jobs:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@v4
with:
go-version: "1.17.x"
- name: Cache Go Dependencies
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
~/.cache/go-build

View file

@ -13,12 +13,12 @@ jobs:
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
uses: actions/setup-go@v4
with:
go-version: "1.17.x"
- name: Cache Go Dependencies
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
~/.cache/go-build

View file

@ -1,30 +1,28 @@
# syntax=docker/dockerfile:1
# Build the application from source
FROM golang:1.21.4 AS build-stage
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /prometheus-jitsi-meet-exporter
FROM alpine:3.18.3 as builder
# Run the tests in the container
FROM build-stage AS run-test-stage
RUN go test -v ./...
WORKDIR /go/src/github.com/systemli/prometheus-jitsi-meet-exporter
# Deploy the application binary into a lean image
FROM gcr.io/distroless/base-debian11 AS build-release-stage
ENV USER=appuser
ENV UID=10001
WORKDIR /
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"
COPY --from=build-stage /prometheus-jitsi-meet-exporter /prometheus-jitsi-meet-exporter
FROM scratch
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/group /etc/group
COPY prometheus-jitsi-meet-exporter /prometheus-jitsi-meet-exporter
USER appuser:appuser
EXPOSE 9888
USER nonroot:nonroot
ENTRYPOINT ["/prometheus-jitsi-meet-exporter"]

2
go.mod
View file

@ -2,4 +2,4 @@ module github.com/systemli/prometheus-jitsi-meet-exporter
go 1.17
require github.com/google/go-cmp v0.6.0
require github.com/google/go-cmp v0.5.9

4
go.sum
View file

@ -1,2 +1,2 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=