i fixed the docker

This commit is contained in:
Jonas Winkler
2020-10-29 00:46:57 +01:00
parent 329ee5b593
commit 7a620521bb
4 changed files with 169 additions and 196 deletions

View File

@@ -1,56 +1,44 @@
version: '2.1'
version: "3.8"
services:
webserver:
build: ./
# uncomment the following line to start automatically on system boot
# restart: always
ports:
# You can adapt the port you want Paperless to listen on by
# modifying the part before the `:`.
- "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
# You have to adapt the local path you want the consumption
# directory to mount to by modifying the part before the ':'.
- ./consume:/consume
env_file: docker-compose.env
# The reason the line is here is so that the webserver that doesn't do
# any text recognition and doesn't have to install unnecessary
# languages the user might have set in the env-file by overwriting the
# value with nothing.
environment:
- PAPERLESS_OCR_LANGUAGES=
command: ["gunicorn", "-b", "0.0.0.0:8000"]
db:
image: postgres:13
#restart: always
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: paperless
consumer:
build: ./
# uncomment the following line to start automatically on system boot
# restart: always
depends_on:
webserver:
condition: service_healthy
volumes:
- data:/usr/src/paperless/data
- media:/usr/src/paperless/media
# This should be set to the same value as the consume directory
# in the webserver service above.
- ./consume:/consume
# Likewise, you can add a local path to mount a directory for
# exporting. This is not strictly needed for paperless to
# function, only if you're exporting your files: uncomment
# it and fill in a local path if you know you're going to
# want to export your documents.
# - /path/to/another/arbitrary/place:/export
env_file: docker-compose.env
command: ["document_consumer"]
webserver:
build: .
image: paperless_app
#restart: always
depends_on:
- db
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- data:/usr/src/paperless/data
env_file: docker-compose.env
environment:
- PAPERLESS_OCR_LANGUAGES=
command: ["gunicorn", "-b", "0.0.0.0:8000"]
consumer:
image: paperless_app
depends_on:
- webserver
- db
restart: on-failure:5
volumes:
- data:/usr/src/paperless/data
- ./consume:/usr/src/paperless/consume
env_file: docker-compose.env
command: ["document_consumer"]
volumes:
data:
media:
data: