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.
 
 
 
 
 

40 lines
966 B

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