Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
updated some dependencies, updated docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Winkler committed Nov 13, 2020
1 parent 0421031 commit f92ee00
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 68 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ WORKDIR /usr/src/paperless/src/

RUN sudo -HEu paperless python3 manage.py collectstatic --clear --no-input

VOLUME ["/usr/src/paperless/data", "/usr/src/paperless/consume", "/usr/src/paperless/export"]
VOLUME ["/usr/src/paperless/data", "/usr/src/paperless/media", "/usr/src/paperless/consume", "/usr/src/paperless/export"]
ENTRYPOINT ["/sbin/docker-entrypoint.sh"]
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]

LABEL maintainer="Jonas Winkler <[email protected]>"
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ psycopg2-binary = "*"
scikit-learn="~=0.23"
whoosh="~=2.7"
gunicorn = "*"
whitenoise = "*"
whitenoise = "~=5.2"
fuzzywuzzy = "*"
python-Levenshtein = "*"
django-extensions = "*"
Expand All @@ -33,7 +33,7 @@ redis = "*"
[dev-packages]
coveralls = "*"
factory-boy = "*"
sphinx = "*"
sphinx = "~=3.3"
tox = "*"
pycodestyle = "*"
pytest = "*"
Expand All @@ -42,3 +42,4 @@ pytest-django = "*"
pytest-sugar = "*"
pytest-env = "*"
pytest-xdist = "*"
sphinx_rtd_theme = "*"
122 changes: 64 additions & 58 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docker-compose.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@

# Adjust this key if you plan to make paperless available publicly. It should
# be a very long sequence of random characters. You don't need to remember it.
#PAPERLESS_SECRET_KEY="change-me"
#PAPERLESS_SECRET_KEY=change-me

# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC.
#PAPERLESS_TIME_ZONE=America/Los_Angeles

# The default language to use for OCR. Set this to the language most of your
# documents are written in.
#PAPERLESS_OCR_LANGUAGE="eng"
#PAPERLESS_OCR_LANGUAGE=eng

# By default Paperless does not OCR a document if the text can be retrieved from
# the document directly. Set to true to always OCR documents. (i.e., if you
# know that some of your documents have faulty/bad OCR data)
#PAPERLESS_OCR_ALWAYS="true"
#PAPERLESS_OCR_ALWAYS=true
1 change: 0 additions & 1 deletion docker-compose.yml → docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ services:
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
command: ["supervisord", "-c", "/etc/supervisord.conf"]


volumes:
Expand Down
31 changes: 31 additions & 0 deletions docker-compose.yml.sqlite.example
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:
image: jonaswinkler/paperless-ng:latest
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:
6 changes: 5 additions & 1 deletion scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,9 @@ if [[ ! -z "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES"
fi

exec "$@"
if [[ "$1" != "/"* ]]; then
exec sudo -HEu paperless python3 manage.py "$@"
else
exec "$@"
fi

3 changes: 2 additions & 1 deletion scripts/supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[supervisord]
nodaemon=true ; start in foreground if true; default false
logfile=/var/log/supervisord/supervisord.log ; main log file; default $CWD/supervisord.log
pidfile=/var/log/supervisord/supervisord.pid ; supervisord pidfile; default supervisord.pid
pidfile=/var/run/supervisord/supervisord.pid ; supervisord pidfile; default supervisord.pid
logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10 ; # of main logfile backups; 0 means none, default 10
loglevel=info ; log level; default info; others: debug,warn,trace
user=root

[program:gunicorn]
command=gunicorn -c /usr/src/paperless/gunicorn.conf.py -b 0.0.0.0:8000 paperless.wsgi
Expand Down

0 comments on commit f92ee00

Please sign in to comment.