2020-11-01 23:01:36 +01:00
|
|
|
version: "3.4"
|
Add Dockerfile for application and documentation
This commit adds a `Dockerfile` to the root of the project, accompanied
by a `docker-compose.yml.example` for simplified deployment. The
`Dockerfile` is agnostic to whether it will be the webserver, the
consumer, or if it is run for a one-off command (i.e. creation of a
superuser, migration of the database, document export, ...).
The containers entrypoint is the `scripts/docker-entrypoint.sh` script.
This script verifies that the required permissions are set, remaps the
default users and/or groups id if required and installs additional
languages if the user wishes to.
After initialization, it analyzes the command the user supplied:
- If the command starts with a slash, it is expected that the user
wants to execute a binary file and the command will be executed
without further intervention. (Using `exec` to effectively replace
the started shell-script and not have any reaping-issues.)
- If the command does not start with a slash, the command will be
passed directly to the `manage.py` script without further
modification. (Again using `exec`.)
The default command is set to `--help`.
If the user wants to execute a command that is not meant for `manage.py`
but doesn't start with a slash, the Docker `--entrypoint` parameter can
be used to circumvent the mechanics of `docker-entrypoint.sh`.
Further information can be found in `docs/setup.rst` and in
`docs/migrating.rst`.
For additional convenience, a `Dockerfile` has been added to the `docs/`
directory which allows for easy building and serving of the
documentation. This is documented in `docs/requirements.rst`.
2016-02-17 18:45:04 +01:00
|
|
|
services:
|
2020-11-09 20:29:02 +01:00
|
|
|
broker:
|
2020-11-11 20:47:48 +01:00
|
|
|
image: redis:6.0
|
|
|
|
|
restart: always
|
2020-11-09 20:29:02 +01:00
|
|
|
|
2020-10-29 00:46:57 +01:00
|
|
|
webserver:
|
2020-11-14 12:10:38 +01:00
|
|
|
build: .
|
2020-11-11 20:47:48 +01:00
|
|
|
restart: always
|
2020-10-29 00:46:57 +01:00
|
|
|
depends_on:
|
2020-11-11 20:47:48 +01:00
|
|
|
- broker
|
2020-10-29 00:46:57 +01:00
|
|
|
ports:
|
2020-11-09 20:29:02 +01:00
|
|
|
- 8000:8000
|
2020-10-29 00:46:57 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 5
|
|
|
|
|
volumes:
|
|
|
|
|
- data:/usr/src/paperless/data
|
2020-10-29 22:30:36 +01:00
|
|
|
- media:/usr/src/paperless/media
|
|
|
|
|
- ./export:/usr/src/paperless/export
|
2020-11-01 23:01:36 +01:00
|
|
|
- ./consume:/usr/src/paperless/consume
|
2020-11-14 13:14:22 +01:00
|
|
|
env_file: docker-compose.env
|
2020-11-09 20:29:02 +01:00
|
|
|
environment:
|
|
|
|
|
PAPERLESS_REDIS: redis://broker:6379
|
Add Dockerfile for application and documentation
This commit adds a `Dockerfile` to the root of the project, accompanied
by a `docker-compose.yml.example` for simplified deployment. The
`Dockerfile` is agnostic to whether it will be the webserver, the
consumer, or if it is run for a one-off command (i.e. creation of a
superuser, migration of the database, document export, ...).
The containers entrypoint is the `scripts/docker-entrypoint.sh` script.
This script verifies that the required permissions are set, remaps the
default users and/or groups id if required and installs additional
languages if the user wishes to.
After initialization, it analyzes the command the user supplied:
- If the command starts with a slash, it is expected that the user
wants to execute a binary file and the command will be executed
without further intervention. (Using `exec` to effectively replace
the started shell-script and not have any reaping-issues.)
- If the command does not start with a slash, the command will be
passed directly to the `manage.py` script without further
modification. (Again using `exec`.)
The default command is set to `--help`.
If the user wants to execute a command that is not meant for `manage.py`
but doesn't start with a slash, the Docker `--entrypoint` parameter can
be used to circumvent the mechanics of `docker-entrypoint.sh`.
Further information can be found in `docs/setup.rst` and in
`docs/migrating.rst`.
For additional convenience, a `Dockerfile` has been added to the `docs/`
directory which allows for easy building and serving of the
documentation. This is documented in `docs/requirements.rst`.
2016-02-17 18:45:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
volumes:
|
2020-10-29 00:46:57 +01:00
|
|
|
data:
|
2020-10-29 22:30:36 +01:00
|
|
|
media:
|