Add Paperless-ngx to production deployment

- Add Paperless-ngx service to Docker Compose configuration
- Configure nginx routing for /paperless/ path with large file support
- Add production environment variables for Paperless
- Create automated setup script for initial Paperless configuration
- Add comprehensive production setup documentation
- Configure Paperless with HTTPS and proper database setup
- Update Django app to use production Paperless instance
This commit is contained in:
Stiftung Development
2025-09-09 22:00:32 +02:00
parent 236e1d2ad2
commit fa6d1b64df
5 changed files with 277 additions and 11 deletions

View File

@@ -141,6 +141,46 @@ services:
memory: 512M
cpus: '0.5'
paperless:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- redis
ports:
- "127.0.0.1:8080:8000"
healthcheck:
test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- paperless_data:/usr/src/paperless/data
- paperless_media:/usr/src/paperless/media
- paperless_export:/usr/src/paperless/export
- paperless_consume:/usr/src/paperless/consume
environment:
PAPERLESS_REDIS: redis://redis:6379
PAPERLESS_DBHOST: db
PAPERLESS_DBNAME: ${PAPERLESS_DB:-paperless}
PAPERLESS_DBUSER: ${PAPERLESS_USER:-paperless}
PAPERLESS_DBPASS: ${PAPERLESS_PASSWORD:-paperless}
PAPERLESS_ADMIN_USER: ${PAPERLESS_ADMIN_USER:-admin}
PAPERLESS_ADMIN_PASSWORD: ${PAPERLESS_ADMIN_PASSWORD:-admin}
PAPERLESS_ADMIN_MAIL: ${PAPERLESS_ADMIN_MAIL:-admin@localhost}
PAPERLESS_SECRET_KEY: ${PAPERLESS_SECRET_KEY}
PAPERLESS_URL: https://vhtv-stiftung.de/paperless
PAPERLESS_ALLOWED_HOSTS: vhtv-stiftung.de,www.vhtv-stiftung.de
PAPERLESS_CORS_ALLOWED_HOSTS: https://vhtv-stiftung.de,https://www.vhtv-stiftung.de
PAPERLESS_TRUSTED_PROXIES: 172.16.0.0/12,10.0.0.0/8,192.168.0.0/16
PAPERLESS_FORCE_SCRIPT_NAME: /paperless
PAPERLESS_STATIC_URL: /paperless/static/
deploy:
resources:
limits:
memory: 2G
cpus: '1.0'
volumes:
postgres_data:
redis_data:
@@ -149,6 +189,10 @@ volumes:
gramps_thumb_cache:
gramps_cache:
gramps_secret:
paperless_data:
paperless_media:
paperless_export:
paperless_consume:
networks:
default: