Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

CI: Fix multi stage builds (#190)

Quinn Casey1e6c666df467
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b55d83128..3c2ffb6b9 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -306,7 +306,8 @@ jobs:
-
name: Export frontend artifact from docker
run: |
- docker cp ${{ steps.prepare.outputs.tags }}:/src/src/documents/static/frontend/ src/documents/static/frontend/
+ docker run -d --name frontend-extract ${{ steps.prepare.outputs.tags }}
+ docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/
-
name: Upload frontend artifact
uses: actions/upload-artifact@v2
diff --git a/Dockerfile b/Dockerfile
index da07e9e13..2003e8714 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@ FROM node:16 AS compile-frontend
COPY . /src
WORKDIR /src/src-ui
-RUN npm install
+RUN npm update npm -g && npm install
RUN ./node_modules/.bin/ng build --configuration production
@@ -74,7 +74,7 @@ RUN apt-get update \
git \
zlib1g-dev \
libjpeg62-turbo-dev \
- && if [ "$(uname -m)" = "armv7l" ]; \
+ && if [ "$(uname -m)" = "armv7l" ] || [ "$(uname -m)" = "aarch64" ]; \
then echo "Building qpdf" \
&& mkdir -p /usr/src/qpdf \
&& cd /usr/src/qpdf \
@@ -88,8 +88,9 @@ RUN apt-get update \
else \
echo "Skipping qpdf build because pikepdf binary wheels are available."; \
fi \
+ && python3 -m pip install --upgrade pip wheel \
&& python3 -m pip install --default-timeout=1000 --upgrade --no-cache-dir supervisor \
- && python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
+ && python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
&& apt-get -y purge build-essential git zlib1g-dev libjpeg62-turbo-dev \
&& apt-get -y autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
@@ -98,7 +99,7 @@ RUN apt-get update \
COPY docker/ ./docker/
RUN cd docker \
- && cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
+ && cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& mkdir /var/log/supervisord /var/run/supervisord \
&& cp supervisord.conf /etc/supervisord.conf \
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \