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.
This commit is contained in:
Toxix
2021-07-04 00:15:29 +02:00
committed by Trenton Holmes
parent 88d5bdc8bf
commit a6144e9692
3 changed files with 12 additions and 12 deletions

View File

@@ -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
@@ -88,7 +97,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 \