Files
stt-module/Dockerfile
Billy D. af9f8cc01e
Some checks failed
CI / Lint (pull_request) Failing after 57s
CI / Test (pull_request) Failing after 1m23s
CI / Release (pull_request) Has been skipped
CI / Docker Build & Push (pull_request) Has been skipped
CI / Notify (pull_request) Successful in 1s
feat: migrate to typed messages, drop base64, fix AudioBuffer
- AudioBuffer getAudio(): use ab.totalBytes directly (eliminates triple-copy)
- Decode STTStreamMessage via natsutil.Decode[messages.STTStreamMessage]
- Audio chunks arrive as raw []byte (no base64 decode needed)
- Publish STTTranscription struct (not map[string]any)
- Interrupts use messages.STTInterrupt
- Remove encoding/base64 import
- Add .dockerignore, GOAMD64=v3 in Dockerfile
- All 15 tests pass
2026-02-20 07:11:23 -05:00

24 lines
476 B
Docker

# Build stage — Go STT streaming service (HTTP variant)
FROM golang:1.25-alpine AS builder
WORKDIR /app
RUN apk add --no-cache ca-certificates
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOAMD64=v3 go build -ldflags="-w -s" -o /stt-module .
# Runtime stage
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /stt-module /stt-module
USER 65534:65534
ENTRYPOINT ["/stt-module"]