1. If you pull the image from the docker hub, all you need to do is:
```shell-session
- $ docker compose pull
- $ docker compose up
+ docker compose pull
+ docker compose up
```
The Docker Compose files refer to the `latest` version, which is
1. If you built the image yourself, do the following:
```shell-session
- $ git pull
- $ docker compose build
- $ docker compose up
+ git pull
+ docker compose build
+ docker compose up
```
Running `docker compose up` will also apply any new database migrations.
environment before that, if you use one.
```shell-session
- $ pip install -r requirements.txt
+ pip install -r requirements.txt
```
!!! note
3. Migrate the database.
```shell-session
- $ cd src
- $ python3 manage.py migrate # (1)
+ cd src
+ python3 manage.py migrate # (1)
```
1. Including `sudo -Hu <paperless_user>` may be required
actual user ID on the host system, which you can get by executing
``` shell-session
- $ id -u
+ id -u
```
Paperless will change ownership on its folders to this user, so you
actual group ID on the host system, which you can get by executing
``` shell-session
- $ id -g
+ id -g
```
Paperless will change ownership on its folders to this group, so you
3. Create `consume` and `media` directories:
```bash
- $ mkdir -p consume media
+ mkdir -p consume media
```
4. Install the Python dependencies:
```bash
- $ pipenv install --dev
+ pipenv install --dev
```
!!! note
5. Install pre-commit hooks:
```bash
- $ pre-commit install
+ pre-commit install
```
6. Apply migrations and create a superuser for your development instance:
```bash
# src/
- $ python3 manage.py migrate
- $ python3 manage.py createsuperuser
+ python3 manage.py migrate
+ python3 manage.py createsuperuser
```
7. You can now either ...
- spin up a bare redis container
```
- $ docker run -d -p 6379:6379 --restart unless-stopped redis:latest
+ docker run -d -p 6379:6379 --restart unless-stopped redis:latest
```
8. Continue with either back-end or front-end development – or both :-).
1. Install the Angular CLI. You might need sudo privileges to perform this command:
```bash
- $ npm install -g @angular/cli
+ npm install -g @angular/cli
```
2. Make sure that it's on your path.
3. Install all necessary modules:
```bash
- $ npm install
+ npm install
```
4. You can launch a development server by running:
```bash
- $ ng serve
+ ng serve
```
This will automatically update whenever you save. However, in-place
1. Have an active pipenv shell (`pipenv shell`) and install Python dependencies:
```bash
- $ pipenv install --dev
+ pipenv install --dev
```
2. Build the documentation
```bash
- $ mkdocs build --config-file mkdocs.yml
+ mkdocs build --config-file mkdocs.yml
```
_alternatively..._
something.
```bash
- $ mkdocs serve
+ mkdocs serve
```
## Building the Docker image
2. Download and run the installation script:
```shell-session
- $ bash -c "$(curl --location --silent --show-error https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
+ bash -c "$(curl --location --silent --show-error https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
```
!!! note
configuration files and consumption directory.
```shell-session
- $ mkdir -v ~/paperless-ngx
+ mkdir -v ~/paperless-ngx
```
2. Go to the [/docker/compose directory on the project
execute the following command:
```shell-session
- $ docker compose run --rm webserver createsuperuser
+ docker compose run --rm webserver createsuperuser
```
or using docker exec from within the container:
```shell-session
- $ python3 manage.py createsuperuser
+ python3 manage.py createsuperuser
```
This will prompt you to set a username, an optional e-mail address
`docker compose pull` to pull the image, do
```shell-session
- $ docker compose build
+ docker compose build
```
instead to build the image.
1. Stop paperless.
```bash
- $ cd /path/to/current/paperless
- $ docker compose down
+ cd /path/to/current/paperless
+ docker compose down
```
2. Do a backup for two purposes: If something goes wrong, you still
names of your volumes with
``` shell-session
- $ docker volume ls | grep _data
+ docker volume ls | grep _data
```
and adjust the project name in the `.env` file so that it matches
the search index:
```shell-session
- $ docker compose run --rm webserver document_index reindex
+ docker compose run --rm webserver document_index reindex
```
This will migrate your database and create the search index. After
8. Start paperless-ngx.
```bash
- $ docker compose up -d
+ docker compose up -d
```
This will run paperless in the background and automatically start it
automatically. Manually invoke the task processor by executing
```shell-session
- $ celery --app paperless worker
+ celery --app paperless worker
```
- Look at the output of paperless and inspect it for any errors.
with paperless. You may start the webserver directly with
```shell-session
- $ cd /path/to/paperless/src/
- $ gunicorn -c ../gunicorn.conf.py paperless.wsgi
+ cd /path/to/paperless/src/
+ gunicorn -c ../gunicorn.conf.py paperless.wsgi
```
or by any other means such as Apache `mod_wsgi`.
Start the consumer with the management command `document_consumer`:
```shell-session
- $ cd /path/to/paperless/src/
- $ python3 manage.py document_consumer
+ cd /path/to/paperless/src/
+ python3 manage.py document_consumer
```
- **The task processor:** Paperless relies on [Celery - Distributed