mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	 05feadbb7a
			
		
	
	05feadbb7a
	
	
	
		
			
			commita4709b1175Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit3a031084f3Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit0c517e5351Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit5fe435048bMerge:278cedf3a722bfd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:17:30 2022 -0700 Merge pull request #1240 from paperless-ngx/beta [Beta] Paperless-ngx v1.8.0 Release Candidate 1 commita722bfd099Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Thu Jul 28 07:46:12 2022 -0700 New Crowdin updates (#1291) * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations messages.xlf (Turkish) [ci skip] * New translations django.po (Turkish) [ci skip] commitf3d99a5fdbMerge:ca33477079de0989Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 11:21:42 2022 -0700 Merge pull request #1277 from paperless-ngx/fix/redo-ocr-button-on-edit Fix/feature: add redo ocr button to document edit view commit79de0989d5Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commitca334770b7Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Tue Jul 26 09:45:21 2022 -0700 New Crowdin updates (#1242) * New translations messages.xlf (Turkish) [ci skip] * New translations messages.xlf (German) [ci skip] * New translations django.po (German) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Finnish) [ci skip] * New translations messages.xlf (Finnish) [ci skip] commit1071357505Merge:f32dfe02ef790ca6Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:44:42 2022 -0700 Merge pull request #1268 from paperless-ngx/bugfix-db-locked Bugfix: Adds configuration for database timeout, fixing database locked error commitf32dfe0278Merge:611707a34e78ca5dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 12:59:31 2022 -0700 Merge pull request #1261 from paperless-ngx/fix/b1.8.0-ng-select-dropdowns Fix: dropdown selected items not visible again commit278cedf3d0Merge:b141671decc4553eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 09:25:52 2022 -0700 Merge pull request #1272 from paperless-ngx/fix-1263 Documentation: fix occasional code block color legibility commit45a6b5a436Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit611707a3d1Merge:2d88638db4d20d9bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 19:59:30 2022 -0700 Merge pull request #1276 from paperless-ngx/bugfix-webp-import Bugfix: Document import doesn't convert thumbnails to WebP commitb4d20d9b9aAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Sun Jul 24 10:22:53 2022 -0700 Fixes document import copying PNG files to .webp extensions without actual conversion commitecc4553e67Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commitef790ca6f4Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit2d88638da7Merge:0e2e5f3491ba0bd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 10:45:53 2022 -0700 Merge pull request #1269 from paperless-ngx/beta-deps-final Chore: Locks dependencies to the final versions for the beta commit91ba0bd0afAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit0e2e5f3413Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:57:00 2022 -0700 Creates utiliy to ensure all paths in settings are normalized and absolute commit7a99dcf693Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit4e78ca5d82Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit83de38e56fMerge:f4be2e4fb1b6d50aAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 08:26:12 2022 -0700 Merge pull request #1247 from paperless-ngx/bugfix-pikepdf-ocrmypdf-warnings Bugfix: Adds pngquant and jbig2dec to Docker image commitf4be2e4fe7Merge:4444925d16b0f7f9Author: Quinn Casey <quinn@quinncasey.com> Date: Tue Jul 19 21:03:16 2022 -0700 Merge pull request #1259 from paperless-ngx/chore-add-ci-hadolint Chore: Add Hadolint job to CI commit16b0f7f9eeAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit27721aef71Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit329a317fdfAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:54:33 2022 -0700 Configure Hadolint in a single location for both hooks and CI commitdaad634894Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 15 13:45:23 2022 -0700 Adds a CI job for hadolint over all the Dockerfiles, fixes the minor thing it complained about commit4444925deaMerge:4c697ab59c1ae96dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 18 15:55:29 2022 -0700 Merge pull request #1249 from paperless-ngx/fix-generated-changelog [CI] Fix automatic changelog generation on release commit9c1ae96d33Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commitb1b6d50af6Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Mon Jul 18 09:46:31 2022 -0700 Adds a couple packages to the Docker image for ocrmypdf and pikepdf commit4c697ab50eAuthor: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commitb141671d90Merge:48dfbbeb2ab2d912Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 13:18:57 2022 -0700 Merge pull request #1237 from tooomm/patch-1 chore: Run stale bot only on certain labels commit2ab2d9127dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit278453451eAuthor: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit48dfbbebc6Merge:8efb97efe568b300Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 3 07:42:20 2022 -0700 Merge pull request #1110 from paperless-ngx/update-issue-form commit8efb97ef4eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commitd8cda7fc1bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit68f0cf419bMerge:666b938526b12512Author: Felix E <felix@eckhofer.com> Date: Mon Jun 20 14:25:59 2022 +0200 Merge pull request #1148 from pReya/patch-1 fix: update scanner capability commit26b12512b1Author: Moritz Stückler <moritz.stueckler@gmail.com> Date: Mon Jun 20 12:06:54 2022 +0200 fix: update scanner capability The Brother ADS-A1700W does indeed support SFTP. I've just bought it, and set it up like this. commite568b3000eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit666b938550Merge:de5eaf1c163231d3Author: Quinn Casey <quinn@quinncasey.com> Date: Thu May 19 17:23:23 2022 -0700 Merge pull request #990 from tooomm/patch-2 Docs: Fix headings and add links to PRs in changelog commit163231d307Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commite530750fc6Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
		
			
				
	
	
		
			232 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			232 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
| # syntax=docker/dockerfile:1.4
 | |
| 
 | |
| # Pull the installer images from the library
 | |
| # These are all built previously
 | |
| # They provide either a .deb or .whl
 | |
| 
 | |
| ARG JBIG2ENC_VERSION
 | |
| ARG QPDF_VERSION
 | |
| ARG PIKEPDF_VERSION
 | |
| ARG PSYCOPG2_VERSION
 | |
| 
 | |
| FROM ghcr.io/paperless-ngx/paperless-ngx/builder/jbig2enc:${JBIG2ENC_VERSION} as jbig2enc-builder
 | |
| FROM ghcr.io/paperless-ngx/paperless-ngx/builder/qpdf:${QPDF_VERSION} as qpdf-builder
 | |
| FROM ghcr.io/paperless-ngx/paperless-ngx/builder/pikepdf:${PIKEPDF_VERSION} as pikepdf-builder
 | |
| FROM ghcr.io/paperless-ngx/paperless-ngx/builder/psycopg2:${PSYCOPG2_VERSION} as psycopg2-builder
 | |
| 
 | |
| FROM --platform=$BUILDPLATFORM node:16-bullseye-slim AS compile-frontend
 | |
| 
 | |
| # This stage compiles the frontend
 | |
| # This stage runs once for the native platform, as the outputs are not
 | |
| # dependent on target arch
 | |
| # Inputs: None
 | |
| 
 | |
| COPY ./src-ui /src/src-ui
 | |
| 
 | |
| WORKDIR /src/src-ui
 | |
| RUN set -eux \
 | |
|   && npm update npm -g \
 | |
|   && npm ci --omit=optional
 | |
| RUN set -eux \
 | |
|   && ./node_modules/.bin/ng build --configuration production
 | |
| 
 | |
| FROM python:3.9-slim-bullseye as main-app
 | |
| 
 | |
| LABEL org.opencontainers.image.authors="paperless-ngx team <hello@paperless-ngx.com>"
 | |
| LABEL org.opencontainers.image.documentation="https://paperless-ngx.readthedocs.io/en/latest/"
 | |
| LABEL org.opencontainers.image.source="https://github.com/paperless-ngx/paperless-ngx"
 | |
| LABEL org.opencontainers.image.url="https://github.com/paperless-ngx/paperless-ngx"
 | |
| LABEL org.opencontainers.image.licenses="GPL-3.0-only"
 | |
| 
 | |
| ARG DEBIAN_FRONTEND=noninteractive
 | |
| 
 | |
| #
 | |
| # Begin installation and configuration
 | |
| # Order the steps below from least often changed to most
 | |
| #
 | |
| 
 | |
| # copy jbig2enc
 | |
| # Basically will never change again
 | |
| COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/.libs/libjbig2enc* /usr/local/lib/
 | |
| COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/jbig2 /usr/local/bin/
 | |
| COPY --from=jbig2enc-builder /usr/src/jbig2enc/src/*.h /usr/local/include/
 | |
| 
 | |
| # Packages need for running
 | |
| ARG RUNTIME_PACKAGES="\
 | |
|   curl \
 | |
|   file \
 | |
|   # fonts for text file thumbnail generation
 | |
|   fonts-liberation \
 | |
|   gettext \
 | |
|   ghostscript \
 | |
|   gnupg \
 | |
|   gosu \
 | |
|   icc-profiles-free \
 | |
|   imagemagick \
 | |
|   media-types \
 | |
|   liblept5 \
 | |
|   libpq5 \
 | |
|   libxml2 \
 | |
|   liblcms2-2 \
 | |
|   libtiff5 \
 | |
|   libxslt1.1 \
 | |
|   libfreetype6 \
 | |
|   libwebp6 \
 | |
|   libopenjp2-7 \
 | |
|   libimagequant0 \
 | |
|   libraqm0 \
 | |
|   libgnutls30 \
 | |
|   libjpeg62-turbo \
 | |
|   python3 \
 | |
|   python3-pip \
 | |
|   python3-setuptools \
 | |
|   postgresql-client \
 | |
|   # For Numpy
 | |
|   libatlas3-base \
 | |
|   # OCRmyPDF dependencies
 | |
|   tesseract-ocr \
 | |
|   tesseract-ocr-eng \
 | |
|   tesseract-ocr-deu \
 | |
|   tesseract-ocr-fra \
 | |
|   tesseract-ocr-ita \
 | |
|   tesseract-ocr-spa \
 | |
|   # Suggested for OCRmyPDF
 | |
|   pngquant \
 | |
|   # Suggested for pikepdf
 | |
|   jbig2dec \
 | |
|   tzdata \
 | |
|   unpaper \
 | |
|   # Mime type detection
 | |
|   zlib1g \
 | |
|   # Barcode splitter
 | |
|   libzbar0 \
 | |
|   poppler-utils"
 | |
| 
 | |
| # Install basic runtime packages.
 | |
| # These change very infrequently
 | |
| RUN set -eux \
 | |
|   echo "Installing system packages" \
 | |
|     && apt-get update \
 | |
|     && apt-get install --yes --quiet --no-install-recommends ${RUNTIME_PACKAGES} \
 | |
|     && rm -rf /var/lib/apt/lists/* \
 | |
|   && echo "Installing supervisor" \
 | |
|     && python3 -m pip install --default-timeout=1000 --upgrade --no-cache-dir supervisor==4.2.4
 | |
| 
 | |
| # Copy gunicorn config
 | |
| # Changes very infrequently
 | |
| WORKDIR /usr/src/paperless/
 | |
| 
 | |
| COPY gunicorn.conf.py .
 | |
| 
 | |
| # setup docker-specific things
 | |
| # Use mounts to avoid copying installer files into the image
 | |
| # These change sometimes, but rarely
 | |
| WORKDIR /usr/src/paperless/src/docker/
 | |
| 
 | |
| COPY [ \
 | |
|   "docker/imagemagick-policy.xml", \
 | |
|   "docker/supervisord.conf", \
 | |
|   "docker/docker-entrypoint.sh", \
 | |
|   "docker/docker-prepare.sh", \
 | |
|   "docker/paperless_cmd.sh", \
 | |
|   "docker/wait-for-redis.py", \
 | |
|   "docker/management_script.sh", \
 | |
|   "docker/install_management_commands.sh", \
 | |
|   "/usr/src/paperless/src/docker/" \
 | |
| ]
 | |
| 
 | |
| RUN set -eux \
 | |
|   && echo "Configuring ImageMagick" \
 | |
|     && mv imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
 | |
|   && echo "Configuring supervisord" \
 | |
|     && mkdir /var/log/supervisord /var/run/supervisord \
 | |
|     && mv supervisord.conf /etc/supervisord.conf \
 | |
|   && echo "Setting up Docker scripts" \
 | |
|     && mv docker-entrypoint.sh /sbin/docker-entrypoint.sh \
 | |
|     && chmod 755 /sbin/docker-entrypoint.sh \
 | |
|     && mv docker-prepare.sh /sbin/docker-prepare.sh \
 | |
|     && chmod 755 /sbin/docker-prepare.sh \
 | |
|     && mv wait-for-redis.py /sbin/wait-for-redis.py \
 | |
|     && chmod 755 /sbin/wait-for-redis.py \
 | |
|     && mv paperless_cmd.sh /usr/local/bin/paperless_cmd.sh \
 | |
|     && chmod 755 /usr/local/bin/paperless_cmd.sh \
 | |
|   && echo "Installing managment commands" \
 | |
|     && chmod +x install_management_commands.sh \
 | |
|     && ./install_management_commands.sh
 | |
| 
 | |
| # Install the built packages from the installer library images
 | |
| # Use mounts to avoid copying installer files into the image
 | |
| # These change sometimes
 | |
| RUN --mount=type=bind,from=qpdf-builder,target=/qpdf \
 | |
|     --mount=type=bind,from=psycopg2-builder,target=/psycopg2 \
 | |
|     --mount=type=bind,from=pikepdf-builder,target=/pikepdf \
 | |
|   set -eux \
 | |
|   && echo "Installing qpdf" \
 | |
|     && apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/libqpdf28_*.deb \
 | |
|     && apt-get install --yes --no-install-recommends /qpdf/usr/src/qpdf/qpdf_*.deb \
 | |
|   && echo "Installing pikepdf and dependencies" \
 | |
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/pyparsing*.whl \
 | |
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/packaging*.whl \
 | |
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/lxml*.whl \
 | |
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/Pillow*.whl \
 | |
|     && python3 -m pip install --no-cache-dir /pikepdf/usr/src/wheels/pikepdf*.whl \
 | |
|     && python3 -m pip list \
 | |
|   && echo "Installing psycopg2" \
 | |
|     && python3 -m pip install --no-cache-dir /psycopg2/usr/src/wheels/psycopg2*.whl \
 | |
|     && python3 -m pip list
 | |
| 
 | |
| # Python dependencies
 | |
| # Change pretty frequently
 | |
| COPY requirements.txt ../
 | |
| 
 | |
| # Packages needed only for building a few quick Python
 | |
| # dependencies
 | |
| ARG BUILD_PACKAGES="\
 | |
|   build-essential \
 | |
|   git \
 | |
|   python3-dev"
 | |
| 
 | |
| RUN set -eux \
 | |
|   && echo "Installing build system packages" \
 | |
|     && apt-get update \
 | |
|     && apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \
 | |
|     && python3 -m pip install --no-cache-dir --upgrade wheel \
 | |
|   && echo "Installing Python requirements" \
 | |
|     && python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
 | |
|   && echo "Cleaning up image" \
 | |
|     && apt-get -y purge ${BUILD_PACKAGES} \
 | |
|     && apt-get -y autoremove --purge \
 | |
|     && apt-get clean --yes \
 | |
|     && rm -rf /var/lib/apt/lists/* \
 | |
|     && rm -rf /tmp/* \
 | |
|     && rm -rf /var/tmp/* \
 | |
|     && rm -rf /var/cache/apt/archives/* \
 | |
|     && truncate -s 0 /var/log/*log
 | |
| 
 | |
| WORKDIR /usr/src/paperless/src/
 | |
| 
 | |
| # copy backend
 | |
| COPY ./src ./
 | |
| 
 | |
| # copy frontend
 | |
| COPY --from=compile-frontend /src/src/documents/static/frontend/ ./documents/static/frontend/
 | |
| 
 | |
| # add users, setup scripts
 | |
| RUN set -eux \
 | |
|   && addgroup --gid 1000 paperless \
 | |
|   && useradd --uid 1000 --gid paperless --home-dir /usr/src/paperless paperless \
 | |
|   && chown -R paperless:paperless ../ \
 | |
|   && gosu paperless python3 manage.py collectstatic --clear --no-input \
 | |
|   && gosu paperless python3 manage.py compilemessages
 | |
| 
 | |
| VOLUME ["/usr/src/paperless/data", \
 | |
|         "/usr/src/paperless/media", \
 | |
|         "/usr/src/paperless/consume", \
 | |
|         "/usr/src/paperless/export"]
 | |
| 
 | |
| ENTRYPOINT ["/sbin/docker-entrypoint.sh"]
 | |
| 
 | |
| EXPOSE 8000
 | |
| 
 | |
| CMD ["/usr/local/bin/paperless_cmd.sh"]
 |