Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
62484b3681 | |||
|
771354726b | ||
c9f1f3450d | |||
|
8680f7e544 | ||
|
ecdadc8f0b | ||
|
7a943cd22e | ||
|
004b344a2b | ||
|
e40b9d53f0 | ||
|
52eb8cb6d5 |
6 changed files with 39 additions and 29 deletions
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
|
@ -8,6 +8,10 @@ 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: "/"
|
||||||
|
@ -24,3 +28,7 @@ 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@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
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@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
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@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.17.x"
|
go-version: "1.17.x"
|
||||||
|
|
||||||
- name: Cache Go Dependencies
|
- name: Cache Go Dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
|
|
42
Dockerfile
42
Dockerfile
|
@ -1,28 +1,30 @@
|
||||||
FROM alpine:3.18.3 as builder
|
# 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
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/systemli/prometheus-jitsi-meet-exporter
|
# Run the tests in the container
|
||||||
|
FROM build-stage AS run-test-stage
|
||||||
|
RUN go test -v ./...
|
||||||
|
|
||||||
ENV USER=appuser
|
# Deploy the application binary into a lean image
|
||||||
ENV UID=10001
|
FROM gcr.io/distroless/base-debian11 AS build-release-stage
|
||||||
|
|
||||||
RUN adduser \
|
WORKDIR /
|
||||||
--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.5.9
|
require github.com/google/go-cmp v0.6.0
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
|
|
Loading…
Add table
Reference in a new issue