2018-06-08 12:14:52 +00:00
|
|
|
FROM node:alpine AS assetbuilder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
COPY gulpfile.js ./
|
|
|
|
COPY assets/ ./assets/
|
2018-11-14 10:48:54 +00:00
|
|
|
RUN npm install && NODE_ENV=production ./node_modules/gulp/bin/gulp.js
|
2018-06-08 12:14:52 +00:00
|
|
|
|
|
|
|
FROM golang:latest AS binarybuilder
|
2018-05-10 19:31:30 +00:00
|
|
|
WORKDIR /go/src/github.com/usefathom/fathom
|
2018-06-08 12:14:52 +00:00
|
|
|
COPY . /go/src/github.com/usefathom/fathom
|
|
|
|
COPY --from=assetbuilder /app/assets/build ./assets/build
|
2018-06-06 13:57:34 +00:00
|
|
|
RUN go get -u github.com/gobuffalo/packr/... && make docker
|
2016-12-25 15:33:57 +00:00
|
|
|
|
2018-05-10 19:31:30 +00:00
|
|
|
FROM alpine:latest
|
2016-12-25 15:33:57 +00:00
|
|
|
EXPOSE 8080
|
2018-09-17 15:20:48 +00:00
|
|
|
HEALTHCHECK --retries=10 CMD ["wget", "-qO-", "http://localhost:8080/health"]
|
2018-06-06 13:57:34 +00:00
|
|
|
RUN apk add --update --no-cache bash ca-certificates
|
2016-12-25 15:33:57 +00:00
|
|
|
WORKDIR /app
|
2018-06-08 12:14:52 +00:00
|
|
|
COPY --from=binarybuilder /go/src/github.com/usefathom/fathom/fathom .
|
2018-05-14 14:34:13 +00:00
|
|
|
CMD ["./fathom", "server"]
|