mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-25 21:57:15 +02:00
paperless-ngx: reindex Tantivy search index on webserver start
This commit is contained in:
@@ -166,6 +166,8 @@ function update_script() {
|
|||||||
msg_info "Updating Paperless-ngx"
|
msg_info "Updating Paperless-ngx"
|
||||||
if ((BRIDGE_UPDATE == 0)); then
|
if ((BRIDGE_UPDATE == 0)); then
|
||||||
sed -i 's|^ExecStart=.*|ExecStart=uv run -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"|' /etc/systemd/system/paperless-webserver.service
|
sed -i 's|^ExecStart=.*|ExecStart=uv run -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"|' /etc/systemd/system/paperless-webserver.service
|
||||||
|
grep -q "document_index reindex" /etc/systemd/system/paperless-webserver.service ||
|
||||||
|
sed -i '/^ExecStart=/i ExecStartPre=uv run -- python manage.py document_index reindex --if-needed --no-progress-bar' /etc/systemd/system/paperless-webserver.service
|
||||||
$STD systemctl daemon-reload
|
$STD systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
cd /opt/paperless
|
cd /opt/paperless
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ Requires=redis.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/paperless/src
|
WorkingDirectory=/opt/paperless/src
|
||||||
|
ExecStartPre=uv run -- python manage.py document_index reindex --if-needed --no-progress-bar
|
||||||
ExecStart=uv run -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
ExecStart=uv run -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
|
||||||
Environment=GRANIAN_HOST=::
|
Environment=GRANIAN_HOST=::
|
||||||
Environment=GRANIAN_PORT=8000
|
Environment=GRANIAN_PORT=8000
|
||||||
|
|||||||
Reference in New Issue
Block a user