Align origin/main with upstream/main (GitHub). The two branches diverged due to pre-rebase vs post-rebase merge commits for the k8s-amd64-dockerfiles feature. Includes: multi-stage Go compilation Dockerfiles, pan-bolt inventory features, CRM relations, Excel import tooling, proto/gRPC updates, migration scripts, and tools/ directory. Excludes deploy/bin/ pre-compiled binaries (arm64, not needed for amd64 K3s cluster; builds use multi-stage Dockerfiles now).
17 lines
452 B
Docker
17 lines
452 B
Docker
FROM golang:1.24-alpine AS builder
|
|
RUN apk add --no-cache git
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server ./gateway/gateway.go
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
WORKDIR /app
|
|
COPY --from=builder /server ./gateway
|
|
COPY deploy/etc/gateway.yaml etc/gateway.yaml
|
|
COPY deploy/tools/ tools/
|
|
EXPOSE 8888
|
|
CMD ["./gateway", "-f", "etc/gateway.yaml"]
|