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