build: add dev compose stack, container image and makefile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
3b3879d9b5
commit
073668a5b4
4 files changed
+88
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM node:24-alpine AS web
|
||||
WORKDIR /src
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY internal/web ./internal/web
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.27-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
COPY --from=web /src/internal/web/static/dist ./internal/web/static/dist
|
||||
ARG VERSION=dev
|
||||
ARG COMMIT=none
|
||||
RUN CGO_ENABLED=0 go build -trimpath \
|
||||
-ldflags "-s -w -X git.zb-server.de/ZB-Server/uptimesebi/internal/buildinfo.Version=${VERSION} -X git.zb-server.de/ZB-Server/uptimesebi/internal/buildinfo.Commit=${COMMIT}" \
|
||||
-o /out/ ./cmd/...
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=build /out/ /usr/local/bin/
|
||||
USER nonroot
|
||||
ENTRYPOINT ["/usr/local/bin/api"]
|
||||
Reference in new issue
Block a user