Skip to content

Commit bf8c4bb

Browse files
authored
Merge pull request #1253 from Websoft9/update-paperlessngx-ec0f6c86
Update paperlessngx
2 parents 1a5a1cf + b83a81a commit bf8c4bb

File tree

2 files changed

+68
-62
lines changed

2 files changed

+68
-62
lines changed

apps/paperlessngx/.env

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,28 @@
1-
W9_REPO=wordpress
2-
W9_DIST=community
3-
W9_VERSION=latest
4-
5-
W9_POWER_PASSWORD=1PrMxExC45LsCT
1+
W9_REPO=ghcr.io/paperless-ngx/paperless-ngx
2+
W9_DIST='community'
3+
W9_VERSION='latest'
4+
W9_POWER_PASSWORD='!Y#Am6L3J3xbFBP0'
65

76
# Environments which for user settings when create application
87
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
9-
W9_HTTP_PORT_SET=9001
10-
# W9_HTTPS_PORT_SET=9002
11-
# W9_DB_PORT_SET=3306
12-
# W9_SSH_PORT_SET=23
13-
W9_KEY_SET="dfsjdkjf77xjxcjcj"
8+
W9_HTTP_PORT_SET='9001'
149

1510
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####
16-
17-
W9_ID=paperlessngx
11+
W9_ID='paperlessngx'
1812

1913
# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
2014
# Some container (e.g teleport) need HTTPS access, then need to set this pra
21-
W9_HTTP_PORT=80
22-
W9_HTTPS_PORT=81
15+
W9_HTTP_PORT=8000
2316

24-
W9_LOGIN_USER=admin
25-
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
26-
# this password can also use password file
27-
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
28-
W9_ADMIN_PATH="/wp-login"
2917

3018
# Container name's suffix must use one of the value
31-
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"
19+
W9_DB_EXPOSE="postgresql"
3220

3321
# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
3422
# If have protocols, should be set it in the APP's ENV
35-
W9_URL=internet_ip:$W9_HTTP_PORT_SET
36-
# modifies W9_URL on init when it is true
37-
W9_URL_REPLACE=true
38-
23+
W9_URL='internet_ip:$W9_HTTP_PORT_SET'
3924
W9_NETWORK=websoft9
4025

4126
#### ----------------------------------------------------------------------------------------- ####
4227

43-
4428
# Below environment is created by apphub
45-
46-
#W9_NAME=""
47-
#W9_RCODE=""

apps/paperlessngx/docker-compose.yml

Lines changed: 59 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,73 @@
1-
# image,docs: https://hub.docker.com/_/wordpress/
2-
31
services:
2+
broker:
3+
image: docker.io/library/redis:7
4+
container_name: $W9_ID-redis
5+
restart: unless-stopped
6+
volumes:
7+
- redisdata:/data
8+
9+
db:
10+
image: docker.io/library/postgres:16
11+
container_name: $W9_ID-postgres
12+
restart: unless-stopped
13+
volumes:
14+
- dbdata:/var/lib/mysql
15+
environment:
16+
POSTGRES_DB: paperlessngx
17+
POSTGRES_USER: postgres
18+
POSTGRES_PASSWORD: $W9_POWER_PASSWORD
419

5-
wordpress:
20+
webserver:
621
image: $W9_REPO:$W9_VERSION
722
container_name: $W9_ID
823
restart: unless-stopped
9-
#This is for access host from container
10-
# extra_hosts: ["host.docker.internal:host-gateway"]
11-
# command: |
12-
# /bin/bash -c "ping -c 3 host.docker.internal"
13-
logging:
14-
driver: "json-file"
15-
options:
16-
max-file: "5"
17-
max-size: 10m
18-
deploy:
19-
resources:
20-
limits:
21-
memory: 5g
22-
cpus: '0.7'
24+
depends_on:
25+
- db
26+
- broker
27+
- gotenberg
28+
- tika
2329
ports:
24-
- $W9_HTTP_PORT_SET:80
25-
env_file: .env
30+
- $W9_HTTP_PORT_SET:8000
2631
volumes:
27-
- wordpress:/var/www/html
28-
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini
32+
- data:/usr/src/paperless/data
33+
- media:/usr/src/paperless/media
34+
- ./export:/usr/src/paperless/export
35+
- ./consume:/usr/src/paperless/consume
36+
env_file: .env
37+
environment:
38+
PAPERLESS_REDIS: redis://$W9_ID-redis:6379
39+
PAPERLESS_DBENGINE: postgresql
40+
PAPERLESS_DBHOST: $W9_ID-postgres
41+
PAPERLESS_DBNAME: paperlessngx
42+
PAPERLESS_DBUSER: postgres
43+
PAPERLESS_DBPASS: $W9_POWER_PASSWORD
44+
PAPERLESS_DBPORT: 5432
45+
PAPERLESS_TIKA_ENABLED: 1
46+
PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://$W9_ID-gotenberg:3000
47+
PAPERLESS_TIKA_ENDPOINT: http://$W9_ID-tika:9998
2948

30-
mariadb:
31-
image: mariadb:10.4
32-
container_name: $W9_ID-mariadb
49+
gotenberg:
50+
image: docker.io/gotenberg/gotenberg:8.7
51+
container_name: $W9_ID-gotenberg
52+
restart: unless-stopped
53+
54+
# The gotenberg chromium route is used to convert .eml files. We do not
55+
# want to allow external content like tracking pixels or even javascript.
56+
command:
57+
- "gotenberg"
58+
- "--chromium-disable-javascript=true"
59+
- "--chromium-allow-list=file:///tmp/.*"
60+
61+
tika:
62+
image: docker.io/apache/tika:latest
63+
container_name: $W9_ID-tika
3364
restart: unless-stopped
34-
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
35-
volumes:
36-
- mysql_data:/var/lib/mysql
37-
environment:
38-
MYSQL_DATABASE: $W9_ID
39-
MYSQL_USER: $W9_ID
40-
MYSQL_PASSWORD: $W9_POWER_PASSWORD
41-
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
4265

4366
volumes:
44-
wordpress:
45-
mysql_data:
67+
data:
68+
media:
69+
dbdata:
70+
redisdata:
4671

4772
networks:
4873
default:

0 commit comments

Comments
 (0)