docspell
This commit is contained in:
parent
2000ce3b3e
commit
715bd48f9f
@ -3,7 +3,7 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
|
|||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: MickLesk (Canbiz)
|
# Author: MickLesk (Canbiz)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source:
|
# Source: https://github.com/community-scripts/ProxmoxVE
|
||||||
|
|
||||||
APP="Docspell"
|
APP="Docspell"
|
||||||
var_tags="${var_tags:-document}"
|
var_tags="${var_tags:-document}"
|
||||||
|
@ -20,11 +20,8 @@ msg_ok "Setup Functions"
|
|||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
htop \
|
htop \
|
||||||
gnupg2 \
|
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
default-jdk \
|
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ghostscript \
|
|
||||||
tesseract-ocr \
|
tesseract-ocr \
|
||||||
tesseract-ocr-deu \
|
tesseract-ocr-deu \
|
||||||
tesseract-ocr-eng \
|
tesseract-ocr-eng \
|
||||||
@ -34,13 +31,13 @@ $STD apt-get install -y \
|
|||||||
ocrmypdf
|
ocrmypdf
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL Repository"
|
|
||||||
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
|
|
||||||
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
|
|
||||||
$STD apt-get update
|
|
||||||
msg_ok "Set up PostgreSQL Repository"
|
|
||||||
|
|
||||||
msg_info "Install/Set up PostgreSQL Database"
|
setup_gs
|
||||||
|
JAVA_VERSION="21" setup_java
|
||||||
|
POSTGRES_VERSION="16" setup_postgres
|
||||||
|
setup_yq
|
||||||
|
|
||||||
|
msg_info "Set up PostgreSQL Database"
|
||||||
$STD apt-get install -y postgresql-16
|
$STD apt-get install -y postgresql-16
|
||||||
DB_NAME=docspell_db
|
DB_NAME=docspell_db
|
||||||
DB_USER=docspell_usr
|
DB_USER=docspell_usr
|
||||||
@ -58,23 +55,15 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
|||||||
} >>~/docspell.creds
|
} >>~/docspell.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
msg_info "Setup Docspell (Patience)"
|
|
||||||
mkdir -p /opt/docspell
|
fetch_and_deploy_gh_release "docspell-joex" "eikek/docspell" "binary" "latest" "/opt/docspell-joex" "docspell-joex_*all.deb"
|
||||||
Docspell=$(curl -fsSL https://github.com/eikek/docspell/releases/latest -o - | grep "title>Release" | cut -d " " -f 5)
|
fetch_and_deploy_gh_release "docspell-restserver" "eikek/docspell" "binary" "latest" "/opt/docspell-restserver" "docspell-restserver_*all.deb"
|
||||||
DocspellDSC=$(curl -fsSL https://github.com/docspell/dsc/releases/latest -o - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
|
fetch_and_deploy_gh_release "docspell-dsc" "docspell/dsc" "singlefile" "latest" "/usr/bin" "dsc"
|
||||||
cd /opt
|
|
||||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb -o docspell-joex_${Docspell}_all.deb
|
|
||||||
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb -o docspell-restserver_${Docspell}_all.deb
|
|
||||||
$STD dpkg -i docspell-*.deb
|
msg_info "Setup Docspell"
|
||||||
curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC} -o dsc_amd64-musl-${DocspellDSC}
|
|
||||||
mv dsc_amd* dsc
|
|
||||||
chmod +x dsc
|
|
||||||
mv dsc /usr/bin
|
|
||||||
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
|
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
|
||||||
curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq
|
|
||||||
chmod +x /usr/bin/yq
|
|
||||||
#JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf"
|
|
||||||
#SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf"
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e '11s|localhost|'"$LOCAL_IP"'|' \
|
-e '11s|localhost|'"$LOCAL_IP"'|' \
|
||||||
-e '17s|localhost|'"$LOCAL_IP"'|' \
|
-e '17s|localhost|'"$LOCAL_IP"'|' \
|
||||||
@ -94,27 +83,6 @@ sed -i \
|
|||||||
-e '358s|password = .*|password = "'"$DB_PASS"'"|' \
|
-e '358s|password = .*|password = "'"$DB_PASS"'"|' \
|
||||||
-e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
|
-e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
|
||||||
/usr/share/docspell-restserver/conf/docspell-server.conf
|
/usr/share/docspell-restserver/conf/docspell-server.conf
|
||||||
|
|
||||||
# sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF"
|
|
||||||
# sed -i -E '/backend\s*\{/,/\}/ {
|
|
||||||
# /jdbc\s*\{/,/\}/ {
|
|
||||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
|
||||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
|
||||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
|
||||||
# }
|
|
||||||
# }' "$SERVER_CONF"
|
|
||||||
# sed -i -E '/postgresql\s*\{/,/\}/ {
|
|
||||||
# /jdbc\s*\{/,/\}/ {
|
|
||||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
|
||||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
|
||||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
|
||||||
# }
|
|
||||||
# }' "$SERVER_CONF"
|
|
||||||
# sed -i -E '/jdbc\s*\{/,/\}/ {
|
|
||||||
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
|
|
||||||
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
|
|
||||||
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
|
|
||||||
# }' "$JOEX_CONF"
|
|
||||||
msg_ok "Setup Docspell"
|
msg_ok "Setup Docspell"
|
||||||
|
|
||||||
msg_info "Setup Apache Solr"
|
msg_info "Setup Apache Solr"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user