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.

41 lines
1016 B

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