mirror of
https://github.com/hanzoai/voice.git
synced 2026-10-03 10:14:33 +00:00
voice is a library, not a second service
I gave it a Dockerfile and an image, which mints another thing to build, deploy, route and operate for one package. api.hanzo.ai is the AI surface and already serves /v1/audio/*; the realtime socket belongs beside them, reached the one way everything else is. The gate stays. This repo had none, its suite opens no database, and a finished service that nothing compiles on push is how it came to be complete and unreachable at the same time. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
-31
@@ -1,31 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM public.ecr.aws/docker/library/golang:1.26.5-alpine AS build
|
||||
# go.mod pins the toolchain. The golang base sets GOTOOLCHAIN=local, which turns
|
||||
# a `go` directive newer than the image into a hard failure rather than a fetch.
|
||||
ENV GOTOOLCHAIN=auto
|
||||
WORKDIR /src
|
||||
|
||||
# Both dependencies — hanzoai/authz and hanzoai/go-openai-realtime — are public
|
||||
# and served by the module proxy, so this needs no credential and no git. A
|
||||
# private-module dance here would be apparatus for a problem this tree does not
|
||||
# have, and one more thing to fail in a build that cannot explain itself.
|
||||
COPY go.mod go.sum ./
|
||||
RUN --mount=type=cache,target=/go/pkg/mod go mod download
|
||||
|
||||
COPY . .
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 go build -ldflags="-w -s" -o voice ./cmd/voice
|
||||
|
||||
FROM public.ecr.aws/docker/library/alpine:3.21
|
||||
LABEL maintainer="https://hanzo.ai/"
|
||||
# Certificates, because every seam this reaches — speech, the model, IAM's JWKS —
|
||||
# is over TLS.
|
||||
RUN apk add --no-cache ca-certificates && update-ca-certificates \
|
||||
&& adduser -D hanzo -u 1000
|
||||
USER 1000
|
||||
WORKDIR /
|
||||
COPY --from=build /src/voice /voice
|
||||
EXPOSE 8140
|
||||
ENTRYPOINT ["/voice"]
|
||||
@@ -1,8 +1,10 @@
|
||||
# hanzoai/voice — a spoken conversation over one socket.
|
||||
#
|
||||
# The service was complete and measured before it had any way to be built, so it
|
||||
# ran nowhere: /v1/voice answered 404 in production while the code sat finished
|
||||
# in main. This file is the missing half.
|
||||
# A library, not a service. `cmd/voice` runs it alone for development; in
|
||||
# production hanzoai/ai imports this and mounts /v1/voice, because that is where
|
||||
# the AI surface already lives and one API host is the whole point of api.hanzo.ai.
|
||||
# An image here would be a second thing to build, deploy, route and operate for
|
||||
# one package.
|
||||
#
|
||||
# `go test ./...` is the real gate here, unlike the sibling services whose suites
|
||||
# need a database. Nothing in this tree opens one — the seams (Turn, Mind, Meter)
|
||||
@@ -15,9 +17,3 @@ test:
|
||||
go build ./...
|
||||
go vet ./...
|
||||
go test ./...
|
||||
|
||||
images:
|
||||
- name: voice
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
repo: ghcr.io/hanzoai/voice
|
||||
|
||||
Reference in New Issue
Block a user