From 11a6d556c1f8edfa3e9d65b2f4af90aceec1147b Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Thu, 1 Sep 2022 17:52:30 -0500 Subject: [PATCH] Update port to 8080 --- Dockerfile | 2 +- Makefile | 11 +++++++++-- server/Makefile | 4 ++-- server/main.go | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dbf5c11..1104ed7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY server/* ./ RUN go mod download RUN go build -o /app/server-bin -EXPOSE 40080 +EXPOSE 8080 RUN adduser -H -D -u 1001 me USER me:me CMD [ "/app/server-bin" ] diff --git a/Makefile b/Makefile index a12690e..f277cf7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ -.PHONY: image +CONMAN=docker + +.PHONY: clean +clean: + $(CONMAN) image rm --force my-chat || true + +.PHONY: image image: - docker build --tag simple-chat-server . + #cd server && make build + $(CONMAN) build --tag my-chat . diff --git a/server/Makefile b/server/Makefile index 763843a..ded6be0 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,8 +1,8 @@ -.PHONY: clean build - +.PHONY: clean clean: rm -f server go.sum +.PHONY: build build: clean go get -u go build diff --git a/server/main.go b/server/main.go index 43188af..7c1580d 100644 --- a/server/main.go +++ b/server/main.go @@ -118,7 +118,7 @@ func main() { }) // Run server - err := http.ListenAndServe(":40080", nil) + err := http.ListenAndServe(":8080", nil) if err != nil { log.Println("while running server:", err) } -- 2.45.2