A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

50 satır
1.6 KiB

  1. # Build image
  2. # SHA256 of golang:1.21-alpine3.18 linux/amd64
  3. FROM golang@sha256:f475434ea2047a83e9ba02a1da8efc250fa6b2ed0e9e8e4eb8c5322ea6997795 as build
  4. LABEL org.opencontainers.image.source="https://github.com/writefreely/writefreely"
  5. LABEL org.opencontainers.image.description="WriteFreely is a clean, minimalist publishing platform made for writers. Start a blog, share knowledge within your organization, or build a community around the shared act of writing."
  6. RUN apk -U upgrade \
  7. && apk add --no-cache nodejs npm make g++ git \
  8. && npm install -g less less-plugin-clean-css \
  9. && mkdir -p /go/src/github.com/writefreely/writefreely
  10. WORKDIR /go/src/github.com/writefreely/writefreely
  11. COPY . .
  12. RUN cat ossl_legacy.cnf > /etc/ssl/openssl.cnf
  13. ENV GO111MODULE=on
  14. ENV NODE_OPTIONS=--openssl-legacy-provider
  15. RUN make build \
  16. && make ui \
  17. && mkdir /stage \
  18. && cp -R /go/bin \
  19. /go/src/github.com/writefreely/writefreely/templates \
  20. /go/src/github.com/writefreely/writefreely/static \
  21. /go/src/github.com/writefreely/writefreely/pages \
  22. /go/src/github.com/writefreely/writefreely/keys \
  23. /go/src/github.com/writefreely/writefreely/cmd \
  24. /stage
  25. # Final image
  26. # SHA256 of alpine:3.18.4 linux/amd64
  27. FROM alpine@sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86
  28. RUN apk -U upgrade \
  29. && apk add --no-cache openssl ca-certificates
  30. COPY --from=build --chown=daemon:daemon /stage /go
  31. WORKDIR /go
  32. VOLUME /go/keys
  33. EXPOSE 8080
  34. USER daemon
  35. ENTRYPOINT ["cmd/writefreely/writefreely"]
  36. HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
  37. CMD curl -fSs http://localhost:8080/health || exit 1