- Implemented new gRPC service `AIService` in `proto/ai/v1/ai.proto` for handling natural language queries. - Generated Go code for the gRPC service and messages in `gen/ai/v1/`. - Created `services/ai-gateway/` directory structure with necessary files for the service. - Added configuration loading and structured logging. - Implemented domain logic for intent parsing and interaction with Home Assistant. - Established outbound adapters for Ollama and Home Assistant with mTLS support. - Updated `go.work` to include the new service and maintain existing dependencies. - Modified `discord-bot` to use the new `ai-gateway` for AI interactions. - Added deployment manifest for Kubernetes and CI/CD configuration for building and deploying the service.
22 lines
505 B
Docker
22 lines
505 B
Docker
FROM golang:1.26-alpine AS builder
|
|
WORKDIR /workspace
|
|
|
|
COPY go.work go.work.sum ./
|
|
COPY gen/ ./gen/
|
|
COPY ha-gateway/ ./ha-gateway/
|
|
COPY discord-bot/ ./discord-bot/
|
|
COPY ai-gateway/ ./ai-gateway/
|
|
|
|
WORKDIR /workspace/ai-gateway
|
|
RUN go mod download
|
|
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 GOOS=linux go build \
|
|
-ldflags="-s -w -X main.version=${VERSION}" \
|
|
-o /ai-gateway ./cmd/gateway
|
|
|
|
FROM gcr.io/distroless/static:nonroot
|
|
COPY --from=builder /ai-gateway /ai-gateway
|
|
EXPOSE 50052
|
|
ENTRYPOINT ["/ai-gateway"]
|