mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
getting paperless-ng ready for the first release.
This commit is contained in:
parent
5944ac2e70
commit
1d759b75b5
4
.gitignore
vendored
4
.gitignore
vendored
@ -65,8 +65,8 @@ target/
|
|||||||
.virtualenv
|
.virtualenv
|
||||||
virtualenv
|
virtualenv
|
||||||
/venv
|
/venv
|
||||||
docker-compose.env
|
/docker-compose.env
|
||||||
docker-compose.yml
|
/docker-compose.yml
|
||||||
|
|
||||||
# Used for development
|
# Used for development
|
||||||
scripts/import-for-development
|
scripts/import-for-development
|
||||||
|
@ -56,10 +56,10 @@ RUN apt-get update \
|
|||||||
|
|
||||||
# copy scripts
|
# copy scripts
|
||||||
# this fixes issues with imagemagick and PDF
|
# this fixes issues with imagemagick and PDF
|
||||||
COPY scripts/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml
|
COPY docker/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml
|
||||||
COPY scripts/gunicorn.conf.py ./
|
COPY docker/gunicorn.conf.py ./
|
||||||
COPY scripts/supervisord.conf /etc/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisord.conf
|
||||||
COPY scripts/docker-entrypoint.sh /sbin/docker-entrypoint.sh
|
COPY docker/docker-entrypoint.sh /sbin/docker-entrypoint.sh
|
||||||
|
|
||||||
# copy app
|
# copy app
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ "${DOCKER_USERNAME}" == "" -o "${DOCKER_PASSWORD}" == "" ]
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker login --username=${DOCKER_USERNAME} --password=${DOCKER_PASSWORD}
|
|
||||||
if [ "${TRAVIS_TAG}" != "" ]
|
|
||||||
then
|
|
||||||
docker tag the-paperless-project/paperless the-paperless-project/paperless:${TRAVIS_TAG}
|
|
||||||
docker push the-paperless-project/paperless:${TRAVIS_TAG}
|
|
||||||
else
|
|
||||||
docker push the-paperless-project/paperless
|
|
||||||
fi
|
|
@ -21,7 +21,7 @@ services:
|
|||||||
- media:/usr/src/paperless/media
|
- media:/usr/src/paperless/media
|
||||||
- ./export:/usr/src/paperless/export
|
- ./export:/usr/src/paperless/export
|
||||||
- ./consume:/usr/src/paperless/consume
|
- ./consume:/usr/src/paperless/consume
|
||||||
env_file: docker-compose.env
|
env_file: ../docker-compose.env
|
||||||
environment:
|
environment:
|
||||||
PAPERLESS_REDIS: redis://broker:6379
|
PAPERLESS_REDIS: redis://broker:6379
|
||||||
|
|
@ -32,7 +32,7 @@ services:
|
|||||||
- media:/usr/src/paperless/media
|
- media:/usr/src/paperless/media
|
||||||
- ./export:/usr/src/paperless/export
|
- ./export:/usr/src/paperless/export
|
||||||
- ./consume:/usr/src/paperless/consume
|
- ./consume:/usr/src/paperless/consume
|
||||||
env_file: docker-compose.env
|
env_file: ../docker-compose.env
|
||||||
environment:
|
environment:
|
||||||
PAPERLESS_REDIS: redis://broker:6379
|
PAPERLESS_REDIS: redis://broker:6379
|
||||||
PAPERLESS_DBHOST: db
|
PAPERLESS_DBHOST: db
|
67
docker/local/Dockerfile
Normal file
67
docker/local/Dockerfile
Normal file
@ -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 <dev@jpwinkler.de>"
|
31
docker/local/docker-compose.sqlite.yml
Normal file
31
docker/local/docker-compose.sqlite.yml
Normal file
@ -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:
|
44
docker/local/docker-compose.yml
Normal file
44
docker/local/docker-compose.yml
Normal file
@ -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:
|
Loading…
x
Reference in New Issue
Block a user