Small fixes

pull/4/head
Quentin McGaw 5 years ago
parent e72740fb05
commit 98a0a87426

@ -1,5 +1,4 @@
.git/ .git/
readme/ readme/
docker-compose.yml docker-compose.yml
.travis.yml
README.md README.md

@ -46,9 +46,9 @@ FROM builder AS server
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY *.go ./ COPY *.go ./
#RUN go test -v #RUN go test -v -race ./...
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o app . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o app .
RUN upx -v --best --ultra-brute --overlay=strip app && upx -t app RUN [ "${BINCOMPRESS}" == "" ] || (upx -v --best --lzma --overlay=strip app && upx -t app)
FROM final FROM final
COPY --from=stackedit --chown=1000 /stackedit/dist /html COPY --from=stackedit --chown=1000 /stackedit/dist /html

@ -27,7 +27,7 @@
- [Stackedit features](https://github.com/benweet/stackedit/blob/master/README.md#stackedit-can) - [Stackedit features](https://github.com/benweet/stackedit/blob/master/README.md#stackedit-can)
- Lightweight image based on: - Lightweight image based on:
- [Stackedit 5.13.2](https://github.com/benweet/stackedit) - [Stackedit 5.13.3](https://github.com/benweet/stackedit)
- [Scratch](https://hub.docker.com/_/scratch) - [Scratch](https://hub.docker.com/_/scratch)
- Golang simple HTTP static server - Golang simple HTTP static server
- Running without root - Running without root

@ -69,7 +69,7 @@ func healthcheck(listeningPort string) {
fmt.Println("Can't build HTTP request") fmt.Println("Can't build HTTP request")
os.Exit(1) os.Exit(1)
} }
client := &http.Client{Timeout: time.Duration(1000) * time.Millisecond} client := &http.Client{Timeout: 1 * time.Second}
response, err := client.Do(request) response, err := client.Do(request)
if err != nil { if err != nil {
fmt.Println("Can't execute HTTP request") fmt.Println("Can't execute HTTP request")

Loading…
Cancel
Save