22 Commits

Author SHA1 Message Date
Jonas Winkler
46d1fdc108 fixed folders, compatible with previous paperless version 2020-10-29 14:30:15 +01:00
Jonas Winkler
7a620521bb i fixed the docker 2020-10-29 00:46:57 +01:00
ljm42
c04ab1f9d4 Allow non-unique GIDs
Need to allow non-unique group ids, so paperless can map to an existing GID.

The comment says the map_uidgid() function came from docker-gitlab, the same fix was applied there too:
  c80bd87662
2020-01-05 18:20:03 -08:00
Fabian Winter
d786b3b7b6 Address comments 2019-11-03 20:14:17 +01:00
Fabian Winter
d740b6d5e7 Support SSL for web interface
Thanks to @MasterofJOKers, here is basic support for SSL:
You need to create your key and certificate and copy them to the `data`
directory, named `ssl.cert` and `ssl.key`.
Then, set `PAPERLESS_USE_SSL` in `docker-compose.env` to `true`.

Solves #576.
2019-11-03 18:30:43 +01:00
Florian Gabsteiger
1c3c65bf20 Enable user-controlled gunicorn options in docker-compose file 2019-09-22 11:47:22 +02:00
Florian Gabsteiger
c7e5bd96df Copy gunicorn.conf to docker container and use it in entrypoint 2019-09-22 11:47:22 +02:00
Florian Gabsteiger
89e298734e Add gunicorn option to docker-entrypoint script 2019-09-22 11:47:22 +02:00
schwabelbauch
074c8e59a0 Update docker-entrypoint.sh
fixed issue with installing tesseract languages
2019-03-27 22:22:20 +01:00
Daniel Quinn
143ad66706 Use [[]] instead of [] in Bash scripts 2018-12-30 17:32:17 +00:00
Sven Fischer
1c0801a3ec fix bug where docker-entrypoint.sh exits w/o notice
This commit fixes a nasty bug, where the docker-entrypoint.sh silently
exits without any error message. The test for a lock file can fail and
due to the `set -e` at the beginning of the file the bash script exists
without starting the paperless application.
It is fixed by moving the check for the existence of the lock file into
the if statement, where the `set -e` does not trigger an exit in case
the statement fails.

Additionally this commit enables the script to trap exit signals and in
that case deletes the lock file.
2018-05-15 19:34:21 +02:00
Daniel Quinn
fb78ee8648 Merge pull request #312 from pitkley/docker-fix-groupmod
Fix modifying the GID under alpine
2018-02-25 12:43:22 +01:00
Pit Kleyersburg
55c8b1b332 Fix modifying the GID under alpine
Fixes #306.
2018-02-25 12:36:51 +01:00
Georgi Todorov
0f6ff6ad53 Add a dependency link between two containers and change the way Django migrations are done. Provide example for auto-starting the containers 2018-02-05 18:23:35 -05:00
Guy
febf6799ef adapted docker-entrypoint script for alpine docker image (mainly how to
install additional OCR languages)
2017-12-20 16:17:58 +02:00
Pit Kleyersburg
6739c46662 Set g+w on the consumption/export directories
This should fix issue #267.
2017-10-31 15:30:33 +01:00
Sven Fischer
951477224e docker-entrypoint.sh: fix shellcheck issues
issues found by shellcheck were:

```
$ shellcheck docker-entrypoint.sh

In docker-entrypoint.sh line 10:
    if [[ ${USERMAP_UID} != ${USERMAP_ORIG_UID} || ${USERMAP_GID} != ${USERMAP_ORIG_GID} ]]; then
                            ^-- SC2053: Quote the rhs of != in [[ ]] to prevent glob matching.
                                                                     ^-- SC2053: Quote the rhs of != in [[ ]] to prevent glob matching.

In docker-entrypoint.sh line 12:
        groupmod -g ${USERMAP_GID} paperless
                    ^-- SC2086: Double quote to prevent globbing and word splitting.

In docker-entrypoint.sh line 65:
        if dpkg -s "$pkg" 2>&1 > /dev/null; then
                          ^-- SC2069: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last.

In docker-entrypoint.sh line 69:
        if ! apt-cache show "$pkg" 2>&1 > /dev/null; then
                                   ^-- SC2069: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last.
```
2017-06-12 21:09:59 +02:00
Sven Fischer
0f812f4e76 Docker: review refacorting for export directory preparation 2017-05-02 19:52:36 +02:00
Sven Fischer
d4e972e96f Docker: review fix: if end-user host-mounts the export directory 2017-05-02 19:06:01 +02:00
Pit Kleyersburg
f88ec987a3 Don't fail on setting consumption-dir permissions
Changing the group or permissions on the consumption directory can fail,
especially on network-mounted directories. If it fails, don't exit the
consumer, but rather output a warning on what the user has to do.

This is related to (and should close) issue #102.
2016-03-30 15:49:56 +02:00
Pit Kleyersburg
21cd4e9f14 Update env-var in Dockerfile, fix volume names 2016-03-02 09:10:52 +01:00
Pit Kleyersburg
724afa59c7 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-18 22:58:32 +01:00