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
|
||||
|
||||
COPY go.mod go.sum main.go ./
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
RUN go build
|
||||
|
||||
COPY . .
|
||||
RUN go build -o labtime cmd/labtime/main.go
|
||||
|
||||
FROM gcr.io/distroless/base-debian12
|
||||
|
||||
|
@ -14,12 +16,10 @@ WORKDIR /
|
|||
|
||||
COPY --from=builder /app/labtime /labtime
|
||||
|
||||
# This is the port currently hardcoded in the application
|
||||
EXPOSE 2112
|
||||
|
||||
# For now the config file path/name are hardcoded in the application
|
||||
VOLUME ["/config"]
|
||||
|
||||
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:
|
||||
- 9090:9090
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus-data/prometheus.yaml:/etc/prometheus/prometheus.yaml
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--config.file=/etc/prometheus/prometheus.yaml'
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3000:3000
|
Loading…
Reference in New Issue