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

Commit 7d3f635

Browse files
author
Toxix
committed
Refector: Do the npm compile as a Build step
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.
1 parent 88042d7 commit 7d3f635

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
FROM node AS compile-frontend
2+
3+
COPY . /src
4+
5+
WORKDIR /src/src-ui
6+
RUN npm install
7+
RUN ./node_modules/.bin/ng build --prod
8+
9+
110
FROM ubuntu:20.04 AS jbig2enc
211

312
WORKDIR /usr/src/jbig2enc
@@ -92,7 +101,7 @@ RUN cd docker \
92101
COPY gunicorn.conf.py ../
93102

94103
# copy app
95-
COPY src/ ./
104+
COPY --from=compile-frontend /src/src/ ./
96105

97106
# add users, setup scripts
98107
RUN addgroup --gid 1000 paperless \

compile-frontend.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/setup.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ Build the Docker image yourself
248248
webserver:
249249
build: .
250250
251-
4. Run the ``compile-frontend.sh`` script. This requires ``node`` and ``npm >= v15``.
252-
253-
5. Follow steps 3 to 8 of :ref:`setup-docker_hub`. When asked to run
251+
4. Follow steps 3 to 8 of :ref:`setup-docker_hub`. When asked to run
254252
``docker-compose pull`` to pull the image, do
255253

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

0 commit comments

Comments
 (0)