Merge pull request #161 from stumpylog/multistep-build

Refactor: Do the npm compile as a Build step in docker (Multistep build)
This commit is contained in:
Quinn Casey
2022-02-28 06:09:17 -08:00
committed by GitHub
6 changed files with 28 additions and 59 deletions

View File

@@ -1,3 +1,12 @@
FROM node:16 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
@@ -103,7 +112,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 \