feat: update environment configuration and README for DocuNova branding
This commit is contained in:
@@ -10,6 +10,7 @@ NEXTCLOUD_UPLOAD_URL=https://nextcloud.example.com/remote.php/dav/files/<USERNAM
|
||||
NEXTCLOUD_FOLDER="<NEXTCLOUD_FOLDER_PATH>"
|
||||
PAPERLESS_NGX_URL=https://paperless.example.com/api/documents/post_document/
|
||||
PAPERLESS_HOST=https://paperless.example.com
|
||||
EXTERNAL_HOSTNAME=docunova.example.com
|
||||
|
||||
# **Tokens/API Credentials**
|
||||
AWS_ACCESS_KEY_ID="<AWS_ACCESS_KEY>"
|
||||
@@ -53,4 +54,4 @@ AUTH_ENABLED=true
|
||||
SESSION_SECRET=<atLeast32Characters>
|
||||
AUTHENTIK_CLIENT_ID=<yourAuthentikAppClientID>
|
||||
AUTHENTIK_CLIENT_SECRET=<yourAuthentikAppClientSecret>
|
||||
AUTHENTIK_CONFIG_URL=<ConfigUrlOfYourApp, e.g. https://authentik.example.com/application/o/document-parser/.well-known/openid-configuration>
|
||||
AUTHENTIK_CONFIG_URL=<ConfigUrlOfYourApp, e.g. https://authentik.example.com/application/o/docunova/.well-known/openid-configuration>
|
||||
@@ -1,8 +1,8 @@
|
||||
# Document Processing System
|
||||
# DocuNova
|
||||
|
||||
## Overview
|
||||
|
||||
This project automates the handling, extraction, and processing of documents using a variety of services, including:
|
||||
DocuNova automates the handling, extraction, and processing of documents using a variety of services, including:
|
||||
|
||||
- **OpenAI** for metadata extraction and text refinement.
|
||||
- **Dropbox** and **Nextcloud** for file storage and uploads.
|
||||
@@ -52,6 +52,7 @@ The `.env` file drives all configuration. This table breaks down key variables
|
||||
| `REDIS_URL` | URL for Redis, used by Celery for broker & result store. | `redis://redis:6379/0` |
|
||||
| `WORKDIR` | Working directory for the application. | `/workdir` |
|
||||
| `GOTENBERG_URL` | Gotenberg PDF processing URL. | `http://gotenberg:3000` |
|
||||
| `EXTERNAL_HOSTNAME` | The external hostname for the application. | `docunova.example.com` |
|
||||
|
||||
### IMAP Configuration (Multiple Mailboxes)
|
||||
|
||||
@@ -145,7 +146,7 @@ This project uses Celery (with Redis) for asynchronous task management and Goten
|
||||
|
||||
### Services in `docker-compose.yml`
|
||||
|
||||
Below is the default structure (simplified):
|
||||
Below is the default structure:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@@ -153,7 +154,7 @@ services:
|
||||
image: christianlouis/document-processor:latest
|
||||
container_name: document_api
|
||||
working_dir: /workdir
|
||||
command: ["sh", "-c", "cd /app && uvicorn app.main:app --host 0.0.0.0 --port 8000"]
|
||||
command: ["sh", "-c", "cd /app && uvicorn app.main:app --host 0.0.0.0 --port 8000 --proxy-headers"]
|
||||
environment:
|
||||
- PYTHONPATH=/app
|
||||
env_file:
|
||||
@@ -164,7 +165,7 @@ services:
|
||||
- redis
|
||||
- worker
|
||||
volumes:
|
||||
- /var/docparse/workdir:/workdir
|
||||
- /var/docparse/workdir:/workdir
|
||||
|
||||
worker:
|
||||
image: christianlouis/document-processor:latest
|
||||
@@ -179,7 +180,7 @@ services:
|
||||
- redis
|
||||
- gotenberg
|
||||
volumes:
|
||||
- /var/docparse/workdir:/workdir
|
||||
- /var/docparse/workdir:/workdir
|
||||
|
||||
gotenberg:
|
||||
image: gotenberg/gotenberg:latest
|
||||
|
||||
@@ -30,6 +30,7 @@ class Settings(BaseSettings):
|
||||
azure_region: str
|
||||
azure_endpoint: str
|
||||
gotenberg_url: str
|
||||
external_hostname: str = "localhost" # Default to localhost
|
||||
|
||||
# Authentik
|
||||
authentik_client_id: Optional[str] = None
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ SESSION_SECRET = config(
|
||||
default="YOUR_DEFAULT_SESSION_SECRET_MUST_BE_32_CHARS_OR_MORE"
|
||||
)
|
||||
|
||||
app = FastAPI(title="Document Processing API")
|
||||
app = FastAPI(title="DocuNova")
|
||||
|
||||
# 1) Session Middleware (for request.session to work)
|
||||
app.add_middleware(SessionMiddleware, secret_key=SESSION_SECRET)
|
||||
@@ -40,7 +40,7 @@ app.add_middleware(ProxyHeadersMiddleware, trusted_hosts="*")
|
||||
|
||||
# 3) (Optional but recommended) Restrict valid hosts:
|
||||
app.add_middleware(TrustedHostMiddleware, allowed_hosts=[
|
||||
"docparse.hosterra.net",
|
||||
settings.external_hostname,
|
||||
"localhost",
|
||||
"127.0.0.1"
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user