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.

43 lines
1.0 KiB

  1. # =========================
  2. # --- BUILD NPM MODULES ---
  3. # =========================
  4. FROM node:16-alpine AS build
  5. RUN apk add yarn g++ make cmake python3 --no-cache
  6. WORKDIR /wiki
  7. COPY ./package.json ./package.json
  8. RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 100000
  9. # ===============
  10. # --- Release ---
  11. # ===============
  12. FROM node:16-alpine
  13. LABEL maintainer="requarks.io"
  14. RUN apk add bash curl git openssh gnupg sqlite --no-cache && \
  15. mkdir -p /wiki && \
  16. mkdir -p /logs && \
  17. mkdir -p /wiki/data/content && \
  18. chown -R node:node /wiki /logs
  19. WORKDIR /wiki
  20. COPY --chown=node:node ./build/assets ./assets
  21. COPY --chown=node:node --from=build /wiki/node_modules ./node_modules
  22. COPY --chown=node:node ./server ./server
  23. COPY --chown=node:node ./build/server/views ./server/views
  24. COPY --chown=node:node ./dev/build/config.yml ./config.yml
  25. COPY --chown=node:node ./build/package.json ./package.json
  26. COPY --chown=node:node ./LICENSE ./LICENSE
  27. USER node
  28. VOLUME ["/wiki/data/content"]
  29. EXPOSE 3000
  30. EXPOSE 3443
  31. CMD ["node", "server"]