Files
voice-assistant/Dockerfile
Billy D. 8ef0c93e47
Some checks failed
CI / Lint (pull_request) Failing after 1m22s
CI / Test (pull_request) Failing after 1m21s
CI / Release (pull_request) Has been skipped
CI / Notify (pull_request) Successful in 1s
feat: migrate to typed messages, drop base64
- Switch OnMessage → OnTypedMessage with natsutil.Decode[messages.VoiceRequest]
- Return *messages.VoiceResponse with raw []byte audio (no base64)
- Use messages.DocumentSource for RAG sources
- Remove strVal/boolVal helpers
- Add .dockerignore, GOAMD64=v3 in Dockerfile
- Update tests for typed structs (7 tests pass)
2026-02-20 07:10:51 -05:00

24 lines
452 B
Docker

# Build stage
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 /voice-assistant .
# Runtime stage
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /voice-assistant /voice-assistant
USER 65534:65534
ENTRYPOINT ["/voice-assistant"]