mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
CI: Fix multi stage builds (#190)
* Try fixing build error * --upgrade instead of --update * Attempt to fix timeout * Try build qpdf on arm64 * Revert "Try build qpdf on arm64" This reverts commit 42823a4d28a7922c2a1c74803514d279caf1b8ec. * Format * Try with libqpdf-dev install * Move libqpdf-dev install to else * Try with correct uname * Run docker container to extract frontend Co-authored-by: Johann Bauer <bauerj@bauerj.eu>
This commit is contained in:
parent
0772231ac0
commit
1e6c666df4
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -306,7 +306,8 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Export frontend artifact from docker
|
name: Export frontend artifact from docker
|
||||||
run: |
|
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
|
name: Upload frontend artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -3,7 +3,7 @@ FROM node:16 AS compile-frontend
|
|||||||
COPY . /src
|
COPY . /src
|
||||||
|
|
||||||
WORKDIR /src/src-ui
|
WORKDIR /src/src-ui
|
||||||
RUN npm install
|
RUN npm update npm -g && npm install
|
||||||
RUN ./node_modules/.bin/ng build --configuration production
|
RUN ./node_modules/.bin/ng build --configuration production
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ RUN apt-get update \
|
|||||||
git \
|
git \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
&& if [ "$(uname -m)" = "armv7l" ]; \
|
&& if [ "$(uname -m)" = "armv7l" ] || [ "$(uname -m)" = "aarch64" ]; \
|
||||||
then echo "Building qpdf" \
|
then echo "Building qpdf" \
|
||||||
&& mkdir -p /usr/src/qpdf \
|
&& mkdir -p /usr/src/qpdf \
|
||||||
&& cd /usr/src/qpdf \
|
&& cd /usr/src/qpdf \
|
||||||
@ -88,8 +88,9 @@ RUN apt-get update \
|
|||||||
else \
|
else \
|
||||||
echo "Skipping qpdf build because pikepdf binary wheels are available."; \
|
echo "Skipping qpdf build because pikepdf binary wheels are available."; \
|
||||||
fi \
|
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 --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 purge build-essential git zlib1g-dev libjpeg62-turbo-dev \
|
||||||
&& apt-get -y autoremove --purge \
|
&& apt-get -y autoremove --purge \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
@ -98,7 +99,7 @@ RUN apt-get update \
|
|||||||
COPY docker/ ./docker/
|
COPY docker/ ./docker/
|
||||||
|
|
||||||
RUN cd 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 \
|
&& mkdir /var/log/supervisord /var/run/supervisord \
|
||||||
&& cp supervisord.conf /etc/supervisord.conf \
|
&& cp supervisord.conf /etc/supervisord.conf \
|
||||||
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \
|
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user