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
|
|
|
|
2021-07-21 19:53:17 +00:00
|
|
|
FROM golang:1.12.14-alpine3.9 AS binarybuilder
|
|
|
|
RUN apk add --no-cache git gcc musl-dev make
|
2019-03-15 18:20:31 +00:00
|
|
|
RUN go get -u github.com/gobuffalo/packr/packr
|
2021-07-21 19:53:17 +00:00
|
|
|
RUN go get -u github.com/usefathom/fathom
|
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-12-17 09:03:21 +00:00
|
|
|
RUN make docker
|
2016-12-25 15:33:57 +00:00
|
|
|
|
2021-07-21 19:53:17 +00:00
|
|
|
FROM alpine:3.14
|
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"]
|