Compare commits
No commits in common. "main" and "1.2.3" have entirely different histories.
6 changed files with 29 additions and 39 deletions
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
|
@ -8,10 +8,6 @@ updates:
|
||||||
day: "friday"
|
day: "friday"
|
||||||
time: "09:00"
|
time: "09:00"
|
||||||
timezone: "Europe/Berlin"
|
timezone: "Europe/Berlin"
|
||||||
groups:
|
|
||||||
gomod:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
- package-ecosystem: "docker"
|
- package-ecosystem: "docker"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
|
@ -28,7 +24,3 @@ updates:
|
||||||
day: "friday"
|
day: "friday"
|
||||||
time: "09:00"
|
time: "09:00"
|
||||||
timezone: "Europe/Berlin"
|
timezone: "Europe/Berlin"
|
||||||
groups:
|
|
||||||
github-actions:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
|
|
8
.github/workflows/integration.yaml
vendored
8
.github/workflows/integration.yaml
vendored
|
@ -14,12 +14,12 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
|
@ -43,12 +43,12 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
|
|
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
@ -13,12 +13,12 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
|
|
42
Dockerfile
42
Dockerfile
|
@ -1,30 +1,28 @@
|
||||||
# syntax=docker/dockerfile:1
|
FROM alpine:3.18.3 as builder
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Run the tests in the container
|
WORKDIR /go/src/github.com/systemli/prometheus-jitsi-meet-exporter
|
||||||
FROM build-stage AS run-test-stage
|
|
||||||
RUN go test -v ./...
|
|
||||||
|
|
||||||
# Deploy the application binary into a lean image
|
ENV USER=appuser
|
||||||
FROM gcr.io/distroless/base-debian11 AS build-release-stage
|
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
|
EXPOSE 9888
|
||||||
|
|
||||||
USER nonroot:nonroot
|
|
||||||
|
|
||||||
ENTRYPOINT ["/prometheus-jitsi-meet-exporter"]
|
ENTRYPOINT ["/prometheus-jitsi-meet-exporter"]
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -2,4 +2,4 @@ module github.com/systemli/prometheus-jitsi-meet-exporter
|
||||||
|
|
||||||
go 1.17
|
go 1.17
|
||||||
|
|
||||||
require github.com/google/go-cmp v0.6.0
|
require github.com/google/go-cmp v0.5.9
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
|
|
Loading…
Add table
Reference in a new issue