From 9ee1291d43af3c045344c7128c57f497daf991b5 Mon Sep 17 00:00:00 2001 From: zhanshi Date: Sat, 8 Feb 2025 12:01:33 +0100 Subject: [PATCH] I have no idea what the fuck I'm doing --- dockerfile | 8 ++++---- main.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dockerfile b/dockerfile index 58dd7a3..089d9a8 100644 --- a/dockerfile +++ b/dockerfile @@ -1,5 +1,5 @@ # use a minimal base image -FROM golang:1.21 AS builder +FROM golang:1.23 AS builder # set the working directory in the container WORKDIR /app @@ -8,7 +8,7 @@ WORKDIR /app COPY . . # build the go server -RUN go mod tidy && go build -o server +RUN go mod tidy && go build -o codex-server # create a smaller final image FROM alpine:latest @@ -16,10 +16,10 @@ FROM alpine:latest WORKDIR /root/ # copy the built binary from the builder stage -COPY --from=builder /app/server . +COPY --from=builder /app/codex-server . # expose the port (match your go server's listening port) EXPOSE 61594 # run the go server -CMD ["./server"] \ No newline at end of file +CMD ["./codex-server"] \ No newline at end of file diff --git a/main.go b/main.go index d3646b3..d4f4ae1 100644 --- a/main.go +++ b/main.go @@ -167,5 +167,5 @@ func main() { log.Println("Serving on :", PORT) - http.ListenAndServe(fmt.Sprintf("127.0.0.1:%d", PORT), nil) + http.ListenAndServe(fmt.Sprintf(":%d", PORT), nil) } \ No newline at end of file