-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrectangular-file.service
More file actions
54 lines (43 loc) · 1.76 KB
/
rectangular-file.service
File metadata and controls
54 lines (43 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[Unit]
Description=Rectangular File - Handwriting Recognition Document Manager
After=network.target
[Service]
User=sysop
Group=sysop
WorkingDirectory=/home/sysop/RectangularFile
ExecStart=/home/sysop/RectangularFile/venv/bin/gunicorn -w 1 -b 0.0.0.0:5000 --timeout 120 --access-logfile - --error-logfile - main:app
Restart=on-failure
# Authentication (Required)
Environment=SECRET_KEY=[your generated key here]
Environment=APP_PASSWORD_HASH=[your generated password hash here]
# Inference API (Required — point to your OpenAI-compatible vision endpoint)
Environment=INFERENCE_API_BASE=http://localhost:8000/v1
Environment=INFERENCE_MODEL=Qwen/Qwen2.5-VL-7B-Instruct
# Environment=INFERENCE_API_KEY= # Required for cloud providers (OpenAI, etc.)
# Environment=INFERENCE_MAX_TOKENS=2048
# Environment=INFERENCE_TIMEOUT=120
# File Storage Paths
Environment=UPLOAD_FOLDER=/mnt/onyx
Environment=DATABASE_PATH=/mnt/rectangularfile/pdf_index.db
# Archive (moves processed files out of upload folder to enable re-upload detection)
Environment=ARCHIVE_ENABLED=true
Environment=ARCHIVE_FOLDER=/mnt/rectangularfile/archive
# Environment=ARCHIVE_PRESERVE_STRUCTURE=true
# Debug/Logging
Environment=DEBUG_IMAGES_DIR=/mnt/rectangularfile/debug_images
# Processing Configuration
Environment=POLLING_INTERVAL=30.0
# System PATH (add poppler-utils)
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Flask Server (optional - can be overridden)
# Environment=FLASK_HOST=0.0.0.0
# Environment=FLASK_PORT=5000
# Environment=FLASK_DEBUG=false
# Document Sources
# Environment=BOOX_ENABLED=true
# Environment=BOOX_FOLDER=/mnt/onyx
# Environment=SABER_ENABLED=false
# Environment=SABER_FOLDER=/mnt/webdav/saber
# Environment=SABER_PASSWORD=
[Install]
WantedBy=multi-user.target