Dockerfile 850 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM node:20
  2. LABEL maintainer="requarks.io"
  3. RUN apt-get update && apt-get install -qy --no-install-recommends \
  4. bash \
  5. build-essential \
  6. curl \
  7. git \
  8. gnupg \
  9. openssh-client \
  10. pandoc \
  11. && rm -rf /var/lib/apt/lists/*
  12. RUN mkdir -p /wiki && \
  13. mkdir -p /logs && \
  14. mkdir -p /wiki/data/content && \
  15. chown -R node:node /wiki /logs
  16. WORKDIR /wiki
  17. COPY --chown=node:node ./assets ./assets
  18. COPY --chown=node:node ./blocks/compiled ./blocks/compiled
  19. COPY --chown=node:node ./server ./server
  20. COPY --chown=node:node ./dev/build/config.yml ./config.yml
  21. COPY --chown=node:node ./LICENSE ./LICENSE
  22. USER node
  23. ENV NODE_ENV=production
  24. WORKDIR /wiki/server
  25. RUN npm ci --foreground-scripts --omit=dev --audit=false --fund=false
  26. WORKDIR /wiki
  27. VOLUME ["/wiki/data/content"]
  28. EXPOSE 3000
  29. EXPOSE 3443
  30. CMD ["node", "server"]