Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (21 sloc)
767 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:alpine AS assetbuilder | |
WORKDIR /app | |
COPY package*.json ./ | |
COPY gulpfile.js ./ | |
COPY assets/ ./assets/ | |
RUN npm install && NODE_ENV=production ./node_modules/gulp/bin/gulp.js | |
FROM golang:latest AS binarybuilder | |
RUN go install github.com/gobuffalo/packr/packr@latest | |
WORKDIR /go/src/github.com/usefathom/fathom | |
COPY . /go/src/github.com/usefathom/fathom | |
COPY --from=assetbuilder /app/assets/build ./assets/build | |
ARG GOARCH=amd64 | |
ARG GOOS=linux | |
RUN make ARCH=${GOARCH} OS=${GOOS} docker | |
FROM alpine:latest | |
EXPOSE 8080 | |
HEALTHCHECK --retries=10 CMD ["wget", "-qO-", "http://localhost:8080/health"] | |
RUN apk add --update --no-cache bash ca-certificates | |
WORKDIR /app | |
COPY --from=binarybuilder /go/src/github.com/usefathom/fathom/fathom . | |
CMD ["./fathom", "server"] |