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