diff --git a/Dockerfile b/Dockerfile index f7f6813..c245a0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,13 +11,14 @@ RUN apk --update add git build-base upx WORKDIR /go/src/app COPY main.go ./ RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o server . && \ - upx -v --best --overlay=strip server && \ + upx -v --best --ultra-brute --overlay=strip server && \ upx -t server FROM scratch LABEL maintainer="quentin.mcgaw@gmail.com" \ description="StackEdit server in a lightweight Docker container" \ - size="29.6MB" \ + download="???MB" \ + size="???MB" \ ram="7MB" \ cpu_usage="Very low" \ github="https://github.com/qdm12/stackedit-docker" diff --git a/README.md b/README.md index 9cff6f4..31a735f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Stackedit build: | Download size | Image size | RAM usage | CPU usage | | --- | --- | --- | --- | -| 15.6MB | 45.5MB | 7MB | Very low | +| ???MB | ???MB | 7MB | Very low | ## Features diff --git a/main.go b/main.go index 7357f2c..ad28ff9 100644 --- a/main.go +++ b/main.go @@ -1,13 +1,25 @@ package main import ( + "fmt" "log" "net/http" + + "github.com/kyokomi/emoji" ) +const listeningPort = "80" + func main() { + fmt.Println("#####################################") + fmt.Println("########## StackEdit Server #########") + fmt.Println("########## by Quentin McGaw #########") + fmt.Println("########## Give some " + emoji.Sprint(":heart:") + "at ##########") + fmt.Println("# github.com/qdm12/stackedit-docker #") + fmt.Print("#####################################\n\n") http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, r.URL.Path[1:]) }) - log.Fatal(http.ListenAndServe(":80", nil)) + log.Println("Web UI listening on 0.0.0.0:" + listeningPort + emoji.Sprint(" :ear:")) + log.Fatal(http.ListenAndServe("0.0.0.0:"+listeningPort, nil)) }