docker build

pull/10/head
Hunter Long 2018-06-29 08:16:26 -07:00
parent 6ec7d08ceb
commit 5c87527516
4 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ services:
env: env:
global: global:
- VERSION=0.27.2 - VERSION=0.27.3
- DB_HOST=localhost - DB_HOST=localhost
- DB_USER=travis - DB_USER=travis
- DB_PASS= - DB_PASS=

View File

@ -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=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/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/$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 cd build
ls ls
mv $APP-linux-alpine $APP mv alpine-linux-amd64 $APP
tar -czvf $APP-linux-alpine.tar.gz $APP && rm -f $APP tar -czvf $APP-linux-alpine.tar.gz $APP && rm -f $APP
mv $APP-darwin-10.6-amd64 $APP mv $APP-darwin-10.6-amd64 $APP

View File

@ -1,6 +1,6 @@
FROM alpine:latest FROM alpine:latest
ENV VERSION=v0.27 ENV VERSION=v0.27.3
RUN apk --no-cache add libstdc++ ca-certificates RUN apk --no-cache add libstdc++ ca-certificates
RUN wget https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \ RUN wget https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \

View File

@ -2,13 +2,13 @@ package main
import ( import (
"fmt" "fmt"
"github.com/hunterlong/statup/log"
"time" "time"
"upper.io/db.v3" "upper.io/db.v3"
"upper.io/db.v3/lib/sqlbuilder" "upper.io/db.v3/lib/sqlbuilder"
"upper.io/db.v3/mysql" "upper.io/db.v3/mysql"
"upper.io/db.v3/postgresql" "upper.io/db.v3/postgresql"
"upper.io/db.v3/sqlite" "upper.io/db.v3/sqlite"
"github.com/hunterlong/statup/log"
) )
var ( var (