fix: docker build
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details

This commit is contained in:
Aire-One 2024-09-23 03:54:23 +02:00
parent bcedc52d7c
commit 17160e38cf
5 changed files with 16 additions and 8 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
.vscode
.woodpecker
configs
.*
renovate.json

View File

@ -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,10 +16,8 @@ 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

View File

@ -0,0 +1 @@
This is a docker compose stack example to run Prometheus with Grafana to play with the Labtime metrics.

View File

@ -5,9 +5,9 @@ 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: