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.

27 lines
686 B

  1. ARG NODE_VERSION="13.7"
  2. FROM node:${NODE_VERSION}-alpine AS frontend-builder
  3. COPY frontend/ /app/
  4. WORKDIR /app
  5. RUN apk add -U --no-cache git python3 make g++ \
  6. && yarn install \
  7. && yarn build \
  8. && apk del --no-cache git make g++
  9. FROM nginx:1.17.4-alpine AS runtime
  10. RUN addgroup -g 61000 doccano \
  11. && adduser -G doccano -S doccano -u 61000
  12. COPY --chown=doccano:doccano --from=frontend-builder /app/dist /var/www/html
  13. COPY nginx/nginx.conf /etc/nginx/nginx.conf
  14. COPY nginx/default.conf /etc/nginx/conf.d/default.conf
  15. RUN chown -R doccano:doccano /var/cache/nginx \
  16. && chmod -R g+w /var/cache/nginx \
  17. && chown -R doccano:doccano /media
  18. EXPOSE 8080
  19. USER doccano:doccano