refactor: complete rewrite #17
|
@ -0,0 +1,7 @@
|
||||||
|
.vscode
|
||||||
|
.woodpecker
|
||||||
|
|
||||||
|
configs
|
||||||
|
|
||||||
|
.*
|
||||||
|
renovate.json
|
10
Dockerfile
10
Dockerfile
|
@ -4,9 +4,11 @@ FROM golang:1.23.1 AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY go.mod go.sum main.go ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN go build
|
|
||||||
|
COPY . .
|
||||||
|
RUN go build -o labtime cmd/labtime/main.go
|
||||||
|
|
||||||
FROM gcr.io/distroless/base-debian12
|
FROM gcr.io/distroless/base-debian12
|
||||||
|
|
||||||
|
@ -14,12 +16,10 @@ WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /app/labtime /labtime
|
COPY --from=builder /app/labtime /labtime
|
||||||
|
|
||||||
# This is the port currently hardcoded in the application
|
|
||||||
EXPOSE 2112
|
EXPOSE 2112
|
||||||
|
|
||||||
# For now the config file path/name are hardcoded in the application
|
|
||||||
VOLUME ["/config"]
|
VOLUME ["/config"]
|
||||||
|
|
||||||
USER nonroot:nonroot
|
USER nonroot:nonroot
|
||||||
|
|
||||||
ENTRYPOINT ["/labtime"]
|
ENTRYPOINT ["/labtime"]
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
This is a docker compose stack example to run Prometheus with Grafana to play with the Labtime metrics.
|
|
@ -5,12 +5,12 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 9090:9090
|
- 9090:9090
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
- prometheus-data/prometheus.yaml:/etc/prometheus/prometheus.yaml
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yaml'
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana
|
image: grafana/grafana
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
Loading…
Reference in New Issue