-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
51 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2 | ||
|
||
jobs: | ||
docker.build: | ||
docker: | ||
- image: docker:17.05.0-ce-git | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: docker info | ||
- run: make docker.build | ||
- run: docker run -it --rm ultreme/calcbiz -h || true | ||
# FIXME: save cache | ||
|
||
workflows: | ||
version: 2 | ||
commit: | ||
jobs: | ||
- docker.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
*~ | ||
*# | ||
.#* | ||
vendor/ | ||
vendor/ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
FROM golang:1.11 | ||
COPY go.* /go/src/ultre.me/calcbiz/ | ||
WORKDIR /go/src/ultre.me/calcbiz | ||
RUN GO111MODULE=on go mod download | ||
COPY . /go/src/ultre.me/calcbiz | ||
RUN GO111MODULE=on go install -v ./cmd/calc-www | ||
CMD ["calc-www", "server"] | ||
EXPOSE 9000 | ||
FROM golang:1.11.4-alpine as builder | ||
WORKDIR /go/src/ultre.me/calcbiz | ||
RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git | ||
RUN go get -u github.com/gobuffalo/packr/packr | ||
ENV GO111MODULE=on | ||
COPY go.* /go/src/ultre.me/calcbiz/ | ||
RUN go mod download | ||
COPY . /go/src/ultre.me/calcbiz/ | ||
RUN make release | ||
|
||
FROM alpine:3.8 | ||
RUN apk --no-cache --update add ca-certificates && update-ca-certificates | ||
COPY --from=builder /go/bin/calcbiz /bin/calcbiz | ||
ENTRYPOINT ["/bin/calcbiz"] | ||
CMD ["server"] | ||
EXPOSE 9000 9001 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters