- operator: GET /v1/namespaces/{ns}/functions/{name}/source
reads build context tar.gz from S3, strips Dockerfile, returns JSON files
- funcs-service v0.2.0:
- Accept: text/html → dark-themed HTML console with accordion cards
- GET /funcs/{ns}/source/{fn} → proxy to operator (service token auth)
- PATCH /funcs/{ns}/triggers/{name} → proxy enable/disable (only enabled field)
- curl (no text/html Accept) → plain text as before (backward compat)
- highlight.js syntax highlighting per file extension
- operator v0.1.34, funcs-service v0.2.0
15 lines
549 B
Docker
15 lines
549 B
Docker
# 2026-04-25 (добавлен index.html — встраивается через go:embed)
|
|
# Dockerfile для sless-funcs-service.
|
|
# Многоэтапная сборка: Go → alpine (минимальный образ).
|
|
|
|
FROM golang:1.23-alpine AS builder
|
|
WORKDIR /build
|
|
COPY go.mod main.go index.html ./
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o funcs-service .
|
|
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates
|
|
COPY --from=builder /build/funcs-service /funcs-service
|
|
EXPOSE 8090
|
|
ENTRYPOINT ["/funcs-service"]
|