mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 22:20:05 +00:00
parent
f4985f5cdb
commit
4b5dfd6933
4 changed files with 96 additions and 98 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,10 +1,14 @@
|
||||||
FROM scratch
|
FROM alpine
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENTRYPOINT ["/cloudkeys-go"]
|
ENV GOPATH /go
|
||||||
|
ENTRYPOINT ["/go/bin/cloudkeys-go"]
|
||||||
CMD ["--storage=local:////data", "--password-salt=changeme", "--username-salt=changeme"]
|
CMD ["--storage=local:////data", "--password-salt=changeme", "--username-salt=changeme"]
|
||||||
|
|
||||||
ADD https://rootcastore.hub.luzifer.io/v1/store/latest /etc/ssl/ca-bundle.pem
|
ADD . /go/src/github.com/Luzifer/cloudkeys-go
|
||||||
ADD ./cloudkeys-go /cloudkeys-go
|
WORKDIR /go/src/github.com/Luzifer/cloudkeys-go
|
||||||
ADD ./templates /templates
|
RUN apk --update add go git ca-certificates \
|
||||||
|
&& go get github.com/tools/godep \
|
||||||
|
&& /go/bin/godep go install -ldflags "-X main.version=$(git describe --tags)" \
|
||||||
|
&& apk --purge del git go
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -2,13 +2,12 @@ VERSION = $(shell git describe --tags)
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
build: bundle_assets
|
build: $(GOPATH)/bin/godep bindata.go
|
||||||
go build .
|
$(GOPATH)/bin/godep go build -ldflags "-X main.version=$(VERSION)" .
|
||||||
|
|
||||||
pre-commit: bundle_assets
|
pre-commit: bindata.go
|
||||||
|
|
||||||
container: bundle_assets
|
container: bindata.go
|
||||||
docker run -v $(CURDIR):/src -e LDFLAGS='-X main.version $(VERSION)' centurylink/golang-builder:latest
|
|
||||||
docker build .
|
docker build .
|
||||||
|
|
||||||
gen_css:
|
gen_css:
|
||||||
|
@ -17,5 +16,8 @@ gen_css:
|
||||||
gen_js:
|
gen_js:
|
||||||
coffee --compile -o assets coffee/*.coffee
|
coffee --compile -o assets coffee/*.coffee
|
||||||
|
|
||||||
bundle_assets: gen_css gen_js
|
bindata.go: gen_css gen_js
|
||||||
go-bindata assets templates
|
go generate
|
||||||
|
|
||||||
|
$(GOPATH)/bin/godep:
|
||||||
|
go get github.com/tools/godep
|
||||||
|
|
162
bindata.go
162
bindata.go
File diff suppressed because one or more lines are too long
2
main.go
2
main.go
|
@ -1,5 +1,7 @@
|
||||||
package main // import "github.com/Luzifer/cloudkeys-go"
|
package main // import "github.com/Luzifer/cloudkeys-go"
|
||||||
|
|
||||||
|
//go:generate go-bindata assets templates
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
Loading…
Reference in a new issue