Skip to content

Commit

Permalink
documentation update (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur authored Jan 21, 2024
1 parent 264e8de commit a10404c
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 112 deletions.
249 changes: 144 additions & 105 deletions docs/setup/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The simpliest docker compose setup for {{ extra.project }} is following:
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: john
PAPERMERGE__AUTH__PASSWORD: hohoho
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__REDIS__URL: redis://redis:6379/0
volumes:
- data:/db
Expand All @@ -37,6 +37,7 @@ The simpliest docker compose setup for {{ extra.project }} is following:
data:
index_db:
media:

```

You can access {{ extra.project }} user interface using any modern web browser (e.g. Firefox, Chrome).
Expand All @@ -54,11 +55,11 @@ uses PostgreSQL:
x-backend: &common
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: john
PAPERMERGE__AUTH__PASSWORD: hohoho
PAPERMERGE__DATABASE__URL: postgresql://scott:tiger@db:5432/mydatabase
PAPERMERGE__REDIS__URL: redis://redis:6379/0
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__DATABASE__URL: postgresql://coco:kesha@db:5432/cocodb
PAPERMERGE__REDIS__URL: redis://redis:6379/0
volumes:
- index_db:/core_app/index_db
- media:/core_app/media
Expand All @@ -68,21 +69,29 @@ uses PostgreSQL:
ports:
- "12000:80"
depends_on:
- redis
- db
db:
condition: service_healthy
redis:
condition: service_healthy
worker:
<<: *common
command: worker
redis:
image: redis:6
db:
image: bitnami/postgresql:14.4.0
image: postgres:16.1
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: scott
POSTGRES_PASSWORD: tiger
POSTGRES_DB: mydatabase
POSTGRES_PASSWORD: kesha
POSTGRES_DB: cocodb
POSTGRES_USER: coco
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
volumes:
postgres_data:
index_db:
Expand All @@ -96,113 +105,143 @@ By default {{ extra.project }} uses Xapian search engine. However, for
production environments, full fledged search engine like Solr is recommanded.
```yaml
version: "3.9"

x-backend: &common
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: john
PAPERMERGE__AUTH__PASSWORD: hohoho
PAPERMERGE__DATABASE__URL: postgresql://scott:tiger@db:5432/mydatabase
PAPERMERGE__REDIS__URL: redis://redis:6379/0
PAPERMERGE__SEARCH__URL: solr://solr:8983/pmg-index
volumes:
- media:/core_app/media
version: "3.9"

services:
web:
<<: *common
ports:
- "12000:80"
depends_on:
- redis
- db
- solr
worker:
<<: *common
command: worker
redis:
image: redis:6
db:
image: bitnami/postgresql:14.4.0
volumes:
- postgres_data:/var/lib/postgresql/data/
x-backend: &common
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
POSTGRES_USER: scott
POSTGRES_PASSWORD: tiger
POSTGRES_DB: mydatabase
solr:
image: solr:9.3
ports:
- "8983:8983"
PAPERMERGE__SECURITY__SECRET_KEY: 1234 # top secret
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__DATABASE__URL: postgresql://coco:kesha@db:5432/cocodb
PAPERMERGE__REDIS__URL: redis://redis:6379/0
PAPERMERGE__SEARCH__URL: solr://solr:8983/pmg-index
volumes:
- solr_data:/var/solr
command:
- solr-precreate
- pmg-index

volumes:
postgres_data:
solr_data:
media:
- media_root:/core_app/media
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy

services:
web:
<<: *common
ports:
- "12000:80"
worker:
<<: *common
command: worker
redis:
image: redis:6
healthcheck:
test: redis-cli --raw incr ping
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
solr:
image: solr:9.3
ports:
- "8983:8983"
volumes:
- solr_data:/var/solr
command:
- solr-precreate
- pmg-index
db:
image: postgres:16.1
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_PASSWORD: kesha
POSTGRES_DB: cocodb
POSTGRES_USER: coco

healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 5s
timeout: 10s
retries: 5
start_period: 10s

volumes:
postgres_data:
solr_data:
media_root:
```
## MySQL / MariaDB
Here is an example of docker compose setup with MariaDB:
```yaml
version: "3.9"
version: "3.9"

x-backend: &common
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
x-backend: &common
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 1234 # top secret
PAPERMERGE__AUTH__USERNAME: eugen
PAPERMERGE__AUTH__PASSWORD: 1234
PAPERMERGE__DATABASE__URL: mysql://myuser:mypass@db:3306/paperdb
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__DATABASE__URL: mysql://coco:kesha@db:3306/cocodb
PAPERMERGE__REDIS__URL: redis://redis:6379/0
PAPERMERGE__SEARCH__URL: solr://solr:8983/pmg-index
volumes:
- media_root:/core_app/media
depends_on:
- redis
- solr
- db

services:
web:
<<: *common
ports:
- "11000:80"
worker:
<<: *common
command: worker
redis:
image: redis:6
solr:
image: solr:9.3
ports:
- "8983:8983"
volumes:
- solr_data:/var/solr
command:
- solr-precreate
- pmg-index
db:
image: mariadb:11.2
volumes:
- maria:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: mypass
MYSQL_DATABASE: paperdb
MYSQL_USER: myuser
MYSQL_PASSWORD: mypass
volumes:
maria:
solr_data:
media_root:
- media_root:/core_app/media
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy

services:
web:
<<: *common
ports:
- "12000:80"
worker:
<<: *common
command: worker
redis:
image: redis:6
healthcheck:
test: redis-cli --raw incr ping
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
solr:
image: solr:9.3
ports:
- "8983:8983"
volumes:
- solr_data:/var/solr
command:
- solr-precreate
- pmg-index
db:
image: mariadb:11.2
volumes:
- maria:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: kesha
MYSQL_DATABASE: cocodb
MYSQL_USER: coco
MYSQL_PASSWORD: kesha
ports:
- "3306:3306"
healthcheck:
test: mariadb-admin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 5s
timeout: 10s
retries: 5
start_period: 10s

volumes:
postgres_data:
solr_data:
media_root:
```
## OAuth 2.0
Expand Down
12 changes: 6 additions & 6 deletions docs/setup/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ The only two required environment variables are
web ui part use following command:

```console
docker run -p 9400:80 \
docker run -p 12000:80 \
-e PAPERMERGE__SECURITY__SECRET_KEY=abc \
-e PAPERMERGE__AUTH__PASSWORD=123 \
-e PAPERMERGE__AUTH__PASSWORD=admin \
papermerge/papermerge:{{ extra.docker_image_version }}
```

Point your web browser to `http://localhost:9400` and you will see login screen:
Point your web browser to `http://localhost:12000` and you will see login screen:


![login screen](../img/setup/login.png)
Expand All @@ -22,7 +22,7 @@ Point your web browser to `http://localhost:9400` and you will see login screen:
Credentials are:

- username `admin`
- password `123`
- password `admin`

!!! Note

Expand Down Expand Up @@ -59,8 +59,8 @@ Here is minimal docker compose file with web UI and one worker:
image: papermerge/papermerge:{{ extra.docker_image_version }}
environment:
PAPERMERGE__SECURITY__SECRET_KEY: 12345
PAPERMERGE__AUTH__USERNAME: john
PAPERMERGE__AUTH__PASSWORD: hohoho
PAPERMERGE__AUTH__USERNAME: admin
PAPERMERGE__AUTH__PASSWORD: admin
PAPERMERGE__REDIS__URL: redis://redis:6379/0
volumes:
- data:/db
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ theme:
repo_url: https://github.com/ciur/papermerge
extra:
project: Papermerge # custom variable for macros plugin
docker_image_version: 3.0.1 # latest docker image version e.g. 3.0, 3.0.1, 3.1.9, 3.0a1
docker_image_version: 3.0.2 # latest docker image version e.g. 3.0, 3.0.1, 3.1.9, 3.0a1
version:
provider: mike
social:
Expand Down

0 comments on commit a10404c

Please sign in to comment.