diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e120071 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:alpine as builder + +WORKDIR /go/src/github.com/cooperspencer/gickup +COPY . . + +RUN go get -d -v ./... +RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app . + +FROM scratch as production +WORKDIR / +COPY --from=builder /go/src/github.com/cooperspencer/gickup/app /gickup/app +CMD ["./gickup/app"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5e13413 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3" +services: + runner: + build: . + # image: cooperspencer/gickup:latest # TODO: Enable the Build in Docker Hub + volumes: + - ${PWD}/config.yml:/gickup/config.yml + command: ["./gickup/app", "/gickup/config.yml"] \ No newline at end of file