Files
query-orchestration/build/Dockerfile
T
Jay Brown 477518e5eb Merged in feature/prometheus (pull request #52)
API instrumentation - metrics and logging

* api instrumentation

prometheus metrics and logging for all routes

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/prometheus

* add log_level

and sync the config initialize

* docs

* cleanup

* add to compose:up:test

* docs for prometheus testing

* custom metrics

* cleanup

* merge main

* add tests

* cleanup docs

* cleanup

* lint

* fix unit tests (attempt)

* fix tests

* resolvesetlogger

* expose 8080

* compose changes

* bugfixesformichael

* don't build _test

* merge in main

* job_sync_runner
2025-02-13 15:44:08 +00:00

36 lines
623 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS build
WORKDIR /app
COPY go.mod .
COPY go.sum .
COPY vendor/ vendor/
COPY cmd/ cmd/
ARG TARGETARCH
SHELL ["/bin/bash", "-c"]
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,target=. \
while read -r dir; do \
CGO_ENABLED=0 GOARCH=$TARGETARCH go build -o "/bin/$(basename "$dir")" "$dir"; \
done < <(find ./cmd -type d -not -name "*_test" -mindepth 1 -maxdepth 1)
FROM scratch AS final
ENV PWD=/app
WORKDIR ${PWD}
COPY database/migrations/ database/migrations/
COPY --from=build /bin/ .
EXPOSE 8080