Skip to content

Commit 9b0fadb

Browse files
committed
fix: listen to all internal interfaces
1 parent 8659386 commit 9b0fadb

File tree

4 files changed

+2
-3
lines changed

4 files changed

+2
-3
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN go mod download
77

88
COPY . /app
99

10-
RUN CGO_ENABLED=0 GOOS=linux go build main.go
10+
RUN CGO_ENABLED=0 GOOS=linux go build -o main
1111

1212
EXPOSE 80
1313

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ services:
66
ports:
77
- "8000:80"
88
volumes:
9-
- ".:/app:rw"
109
- "./data:/data:rw"

main

-6.56 MB
Binary file not shown.

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ func handler(w http.ResponseWriter, r *http.Request) {
1212

1313
func main() {
1414
http.HandleFunc("/", handler)
15-
log.Fatal(http.ListenAndServe(":80", nil))
15+
log.Fatal(http.ListenAndServe("0.0.0.0:80", nil))
1616
}

0 commit comments

Comments
 (0)