Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Refector: Do the npm compile as a Build step
Browse files Browse the repository at this point in the history
This removes the requirement of npm on the host system and removes an
additional manual step during the building of the docker image.

Updated the documentation accordingly and fixed a typo.
  • Loading branch information
Toxix committed Jul 3, 2021
1 parent 88042d7 commit 7d3f635
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
FROM node AS compile-frontend

COPY . /src

WORKDIR /src/src-ui
RUN npm install
RUN ./node_modules/.bin/ng build --prod


FROM ubuntu:20.04 AS jbig2enc

WORKDIR /usr/src/jbig2enc
Expand Down Expand Up @@ -92,7 +101,7 @@ RUN cd docker \
COPY gunicorn.conf.py ../

# copy app
COPY src/ ./
COPY --from=compile-frontend /src/src/ ./

# add users, setup scripts
RUN addgroup --gid 1000 paperless \
Expand Down
7 changes: 0 additions & 7 deletions compile-frontend.sh

This file was deleted.

6 changes: 2 additions & 4 deletions docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ Build the Docker image yourself
webserver:
build: .
4. Run the ``compile-frontend.sh`` script. This requires ``node`` and ``npm >= v15``.

5. Follow steps 3 to 8 of :ref:`setup-docker_hub`. When asked to run
4. Follow steps 3 to 8 of :ref:`setup-docker_hub`. When asked to run
``docker-compose pull`` to pull the image, do

.. code:: shell-session
Expand Down Expand Up @@ -782,7 +780,7 @@ configuring some options in paperless can help improve performance immensely:
your documents before feeding them into paperless. Some scanners are able to
do this! You might want to even specify ``skip_noarchive`` to skip archive
file generation for already ocr'ed documents entirely.
* If you want to perform OCR on the the device, consider using ``PAPERLESS_OCR_CLEAN=none``.
* If you want to perform OCR on the device, consider using ``PAPERLESS_OCR_CLEAN=none``.
This will speed up OCR times and use less memory at the expense of slightly worse
OCR results.
* Set ``PAPERLESS_OPTIMIZE_THUMBNAILS`` to 'false' if you want faster consumption
Expand Down

0 comments on commit 7d3f635

Please sign in to comment.