mirror of https://github.com/statping/statping
docker build
parent
6ec7d08ceb
commit
5c87527516
|
@ -18,7 +18,7 @@ services:
|
|||
|
||||
env:
|
||||
global:
|
||||
- VERSION=0.27.2
|
||||
- VERSION=0.27.3
|
||||
- DB_HOST=localhost
|
||||
- DB_USER=travis
|
||||
- DB_PASS=
|
||||
|
|
|
@ -12,12 +12,12 @@ xgo -go 1.10.x --targets=linux/386 --dest=build -ldflags="-X main.VERSION=$VERSI
|
|||
xgo -go 1.10.x --targets=windows-6.0/amd64 --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" ./
|
||||
CGO_ENABLED=0 GOOS=linux go build -ldflags="-X main.VERSION=$VERSION" -a -o build/$APP-linux-alpine .
|
||||
xgo -go 1.10.x --targets=linux/amd64 --dest=build -ldflags="-X main.VERSION=$VERSION -linkmode external -extldflags -static" -out alpine ./
|
||||
|
||||
cd build
|
||||
ls
|
||||
|
||||
mv $APP-linux-alpine $APP
|
||||
mv alpine-linux-amd64 $APP
|
||||
tar -czvf $APP-linux-alpine.tar.gz $APP && rm -f $APP
|
||||
|
||||
mv $APP-darwin-10.6-amd64 $APP
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM alpine:latest
|
||||
|
||||
ENV VERSION=v0.27
|
||||
ENV VERSION=v0.27.3
|
||||
|
||||
RUN apk --no-cache add libstdc++ ca-certificates
|
||||
RUN wget https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \
|
||||
|
|
|
@ -2,13 +2,13 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hunterlong/statup/log"
|
||||
"time"
|
||||
"upper.io/db.v3"
|
||||
"upper.io/db.v3/lib/sqlbuilder"
|
||||
"upper.io/db.v3/mysql"
|
||||
"upper.io/db.v3/postgresql"
|
||||
"upper.io/db.v3/sqlite"
|
||||
"github.com/hunterlong/statup/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in New Issue