A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
913 B

  1. # Build image
  2. FROM golang:1.12-alpine as build
  3. RUN apk add --update nodejs nodejs-npm make g++ git sqlite-dev
  4. RUN npm install -g less less-plugin-clean-css
  5. RUN go get -u github.com/jteeuwen/go-bindata/...
  6. RUN mkdir -p /go/src/github.com/writeas/writefreely
  7. WORKDIR /go/src/github.com/writeas/writefreely
  8. COPY . .
  9. ENV GO111MODULE=on
  10. RUN make build \
  11. && make ui
  12. RUN mkdir /stage && \
  13. cp -R /go/bin \
  14. /go/src/github.com/writeas/writefreely/templates \
  15. /go/src/github.com/writeas/writefreely/static \
  16. /go/src/github.com/writeas/writefreely/pages \
  17. /go/src/github.com/writeas/writefreely/keys \
  18. /go/src/github.com/writeas/writefreely/cmd \
  19. /stage
  20. # Final image
  21. FROM alpine:3.8
  22. RUN apk add --no-cache openssl ca-certificates
  23. COPY --from=build --chown=daemon:daemon /stage /go
  24. WORKDIR /go
  25. VOLUME /go/keys
  26. EXPOSE 8080
  27. USER daemon
  28. ENTRYPOINT ["cmd/writefreely/writefreely"]