Alter 2 files

Update `Dockerfile`
Update `main.go`
This commit is contained in:
akp 2024-11-01 20:54:02 +00:00
parent d501754b0b
commit 2e6a5d56ba
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755
2 changed files with 4 additions and 4 deletions

View file

@ -1,11 +1,11 @@
FROM golang:1.23 as builder
FROM golang:1.23.2 as builder
RUN mkdir /build
ADD . /build/
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags '-extldflags "-static" -s -w' -o main git.tdpain.net/codemicro/pi-phone
RUN CGO_ENABLED=0 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags '-extldflags "-static" -s -w' -o main git.tdpain.net/codemicro/pi-phone/pi-phone
FROM alpine
FROM debian:bookworm
COPY --from=builder /build/main /
WORKDIR /run

View file

@ -87,7 +87,7 @@ func runServer() error {
s := server{}
mux.HandleFunc("POST /startCall", s.logCaller(s.handleStartCall))
mux.HandleFunc("POST /startCall", s.handleStartCall)
mux.HandleFunc("GET /api/calls/new", s.logCaller(s.handleNewCall))
mux.HandleFunc("GET /api/calls/menu", s.logCaller(s.handleCallMenu))
mux.Handle("GET /audio/", http.FileServer(http.FS(audioAssets)))