mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
build npm assets in intermedia docker container so we can auto-build from git push. relates to #49 #51
This commit is contained in:
parent
96e99d6f96
commit
70b2cc47bb
14
Dockerfile
14
Dockerfile
@ -1,11 +1,19 @@
|
|||||||
FROM golang:latest AS compiler
|
FROM node:alpine AS assetbuilder
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package*.json ./
|
||||||
|
COPY gulpfile.js ./
|
||||||
|
COPY assets/ ./assets/
|
||||||
|
RUN npm install && NODE_ENV=production npx gulp
|
||||||
|
|
||||||
|
FROM golang:latest AS binarybuilder
|
||||||
WORKDIR /go/src/github.com/usefathom/fathom
|
WORKDIR /go/src/github.com/usefathom/fathom
|
||||||
ADD . /go/src/github.com/usefathom/fathom
|
COPY . /go/src/github.com/usefathom/fathom
|
||||||
|
COPY --from=assetbuilder /app/assets/build ./assets/build
|
||||||
RUN go get -u github.com/gobuffalo/packr/... && make docker
|
RUN go get -u github.com/gobuffalo/packr/... && make docker
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
RUN apk add --update --no-cache bash ca-certificates
|
RUN apk add --update --no-cache bash ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=compiler /go/src/github.com/usefathom/fathom/fathom .
|
COPY --from=binarybuilder /go/src/github.com/usefathom/fathom/fathom .
|
||||||
CMD ["./fathom", "server"]
|
CMD ["./fathom", "server"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user