mirror of https://github.com/statping/statping
parent
84f6c18c51
commit
9ad7519cd9
|
@ -18,7 +18,7 @@ services:
|
|||
|
||||
env:
|
||||
global:
|
||||
- VERSION=0.2
|
||||
- VERSION=0.21
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
|
@ -40,6 +40,7 @@ deploy:
|
|||
- "build/statup-linux-arm64"
|
||||
- "build/statup-linux-arm7"
|
||||
- "build/statup-windows-x64.exe"
|
||||
- "build/statup-alpine"
|
||||
skip_cleanup: true
|
||||
|
||||
notifications:
|
||||
|
|
25
Dockerfile
25
Dockerfile
|
@ -1,17 +1,12 @@
|
|||
FROM golang:1.10.3-alpine
|
||||
|
||||
RUN apk update && apk add git g++
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/hunterlong/statup/
|
||||
RUN go get github.com/GeertJohan/go.rice/rice
|
||||
COPY . $GOPATH/src/github.com/hunterlong/statup/
|
||||
RUN go get
|
||||
RUN rice embed-go
|
||||
RUN go install
|
||||
FROM golang:1.10.3 as builder
|
||||
WORKDIR /go/src/github.com/hunterlong/statup
|
||||
COPY . .
|
||||
RUN go get -d -v
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -o statup .
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /app
|
||||
VOLUME /app
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/go/bin/statup"]
|
||||
COPY --from=builder /go/src/github.com/hunterlong/statup /app/
|
||||
RUN chmod +x /app/statup
|
||||
CMD ["./statup", "version"]
|
2
build.sh
2
build.sh
|
@ -14,6 +14,8 @@ xgo -go 1.10.x --targets=windows-6.0/amd64 --dest=build -ldflags="-X main.VERSIO
|
|||
xgo -go 1.10.x --targets=linux/arm-7 --dest=build -ldflags="-X main.VERSION=$VERSION" ./
|
||||
xgo -go 1.10.x --targets=linux/arm64 --dest=build -ldflags="-X main.VERSION=$VERSION" ./
|
||||
|
||||
CGO_ENABLED=0 GOOS=linux go build -ldflags="-X main.VERSION=$VERSION" -a -o build/statup-alpine .
|
||||
|
||||
cd build
|
||||
ls
|
||||
cd ../
|
||||
|
|
Loading…
Reference in New Issue