This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
getting paperless-ng ready for the first release.
- Loading branch information
Jonas Winkler
committed
Nov 14, 2020
1 parent
5944ac2
commit 1d759b7
Showing
13 changed files
with
150 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
############################################################################### | ||
### Back end ### | ||
############################################################################### | ||
|
||
FROM ubuntu:20.04 | ||
|
||
WORKDIR /usr/src/paperless/ | ||
|
||
COPY Pipfile* ./ | ||
|
||
#Dependencies | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND="noninteractive" apt-get -y --no-install-recommends install \ | ||
build-essential \ | ||
curl \ | ||
ghostscript \ | ||
gnupg \ | ||
imagemagick \ | ||
libmagic-dev \ | ||
libpoppler-cpp-dev \ | ||
libpq-dev \ | ||
optipng \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
sudo \ | ||
tesseract-ocr \ | ||
tesseract-ocr-eng \ | ||
tesseract-ocr-deu \ | ||
tesseract-ocr-fra \ | ||
tesseract-ocr-ita \ | ||
tesseract-ocr-spa \ | ||
tzdata \ | ||
unpaper \ | ||
&& pip3 install --upgrade pipenv supervisor setuptools \ | ||
&& pipenv install --system --deploy \ | ||
&& pipenv --clear \ | ||
&& apt-get -y purge build-essential python3-pip python3-dev \ | ||
&& apt-get -y autoremove --purge \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& mkdir /var/log/supervisord /var/run/supervisord | ||
|
||
# copy scripts | ||
# this fixes issues with imagemagick and PDF | ||
COPY docker/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml | ||
COPY docker/gunicorn.conf.py ./ | ||
COPY docker/supervisord.conf /etc/supervisord.conf | ||
COPY docker/docker-entrypoint.sh /sbin/docker-entrypoint.sh | ||
|
||
# copy app | ||
COPY src/ ./src/ | ||
|
||
# add users, setup scripts | ||
RUN addgroup --gid 1000 paperless \ | ||
&& useradd --uid 1000 --gid paperless --home-dir /usr/src/paperless paperless \ | ||
&& chown -R paperless:paperless . \ | ||
&& chmod 755 /sbin/docker-entrypoint.sh | ||
|
||
WORKDIR /usr/src/paperless/src/ | ||
|
||
RUN sudo -HEu paperless python3 manage.py collectstatic --clear --no-input | ||
|
||
VOLUME ["/usr/src/paperless/data", "/usr/src/paperless/media", "/usr/src/paperless/consume", "/usr/src/paperless/export"] | ||
ENTRYPOINT ["/sbin/docker-entrypoint.sh"] | ||
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"] | ||
|
||
LABEL maintainer="Jonas Winkler <[email protected]>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: "3.4" | ||
services: | ||
broker: | ||
image: redis:6.0 | ||
restart: always | ||
|
||
webserver: | ||
build: . | ||
restart: always | ||
depends_on: | ||
- broker | ||
ports: | ||
- 8000:8000 | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8000"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
volumes: | ||
- data:/usr/src/paperless/data | ||
- media:/usr/src/paperless/media | ||
- ./export:/usr/src/paperless/export | ||
- ./consume:/usr/src/paperless/consume | ||
env_file: ../docker-compose.env | ||
environment: | ||
PAPERLESS_REDIS: redis://broker:6379 | ||
|
||
|
||
volumes: | ||
data: | ||
media: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: "3.4" | ||
services: | ||
broker: | ||
image: redis:6.0 | ||
restart: always | ||
|
||
db: | ||
image: postgres:13 | ||
restart: always | ||
volumes: | ||
- pgdata:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_DB: paperless | ||
POSTGRES_USER: paperless | ||
POSTGRES_PASSWORD: paperless | ||
|
||
webserver: | ||
build: . | ||
restart: always | ||
depends_on: | ||
- db | ||
- broker | ||
ports: | ||
- 8000:8000 | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:8000"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
volumes: | ||
- data:/usr/src/paperless/data | ||
- media:/usr/src/paperless/media | ||
- ./export:/usr/src/paperless/export | ||
- ./consume:/usr/src/paperless/consume | ||
env_file: ../docker-compose.env | ||
environment: | ||
PAPERLESS_REDIS: redis://broker:6379 | ||
PAPERLESS_DBHOST: db | ||
|
||
|
||
volumes: | ||
data: | ||
media: | ||
pgdata: |
File renamed without changes.