Skip to content

Commit

Permalink
Merge pull request #626 from ohsu-comp-bio/kube
Browse files Browse the repository at this point in the history
Kubernetes Backend; Go Module Support
  • Loading branch information
kellrott authored Mar 27, 2020
2 parents 8f22db6 + 177ba11 commit 83f3fdf
Show file tree
Hide file tree
Showing 49 changed files with 2,525 additions and 1,431 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ Dockerfile*
build
website
docs
deployments
storage/_test_download
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ storage/_test_download
/webdash/bundle.js
/webdash/style.css
/vendor
docker/funnel
deployments/kubernetes/**/funnel
deployments/kubernetes/**/*.json
funnel
7 changes: 0 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ archives:
- format: tar.gz
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}-{{.Version}}"

dockers:
- goos: linux
goarch: amd64
image_templates:
- "ohsucompbio/funnel:{{.Version}}"
dockerfile: ./docker/Dockerfile

brews:
- github:
owner: ohsu-comp-bio
Expand Down
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ os:
- linux
language: go
go:
- "1.10"
- "1.12"

dist: xenial
sudo: required

services:
Expand All @@ -12,20 +14,20 @@ services:
cache:
directories:
- $GOPATH/pkg
- $GOPATH/src/github.com/ohsu-comp-bio/funnel/.git/modules
- $GOPATH/src/github.com/ohsu-comp-bio/funnel/vendor

git:
submodules: false

install:
- make depends
- make
- export GO111MODULE=on
- make install

jobs:
include:
- stage: all
script: make lint
script:
- make lint-depends
- make lint
env:
- n=lint
- script: make test
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/ohsu-comp-bio/funnel
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make install
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make build

# final stage
FROM alpine
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
ENV PATH="/app:${PATH}"
COPY --from=build-env /go/bin/funnel /app/
COPY --from=build-env /go/src/github.com/ohsu-comp-bio/funnel/funnel /app/

ENTRYPOINT ["/app/funnel"]
18 changes: 18 additions & 0 deletions Dockerfile.dind
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# build stage
FROM golang:1.13.8-alpine AS build-env
RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/ohsu-comp-bio/funnel
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make build

# final stage
FROM docker:stable-dind
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
ENV PATH="/app:${PATH}"
COPY --from=build-env /go/src/github.com/ohsu-comp-bio/funnel/funnel /app/
ADD ./deployments/kubernetes/dind/entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["entrypoint.sh"]
18 changes: 18 additions & 0 deletions Dockerfile.dind-rootless
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# build stage
FROM golang:1.13.8-alpine AS build-env
RUN apk add make git bash build-base
ENV GOPATH=/go
ENV PATH="/go/bin:${PATH}"
ADD ./ /go/src/github.com/ohsu-comp-bio/funnel
RUN cd /go/src/github.com/ohsu-comp-bio/funnel && make build

# final stage
FROM docker:stable-dind-rootless
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
ENV PATH="/app:${PATH}"
COPY --from=build-env /go/src/github.com/ohsu-comp-bio/funnel/funnel /app/
ADD ./deployments/kubernetes/dind-rootless/entrypoint.sh /usr/local/bin/entrypoint.sh

ENTRYPOINT ["entrypoint.sh"]
Loading

0 comments on commit 83f3fdf

Please sign in to comment.