forked from forkanization/Proxmox-arm64
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -13,15 +13,6 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Python3"
|
||||
$STD apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-setuptools \
|
||||
python3-wheel
|
||||
msg_ok "Installed Python3"
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y --no-install-recommends \
|
||||
redis \
|
||||
@@ -50,6 +41,15 @@ $STD apt-get install -y --no-install-recommends \
|
||||
wget
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Python3 Dependencies"
|
||||
$STD apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-setuptools \
|
||||
python3-wheel
|
||||
msg_ok "Installed Python3 Dependencies"
|
||||
|
||||
msg_info "Installing OCR Dependencies (Patience)"
|
||||
$STD apt-get install -y --no-install-recommends \
|
||||
unpaper \
|
||||
@@ -92,6 +92,7 @@ sed -i -e "s|#PAPERLESS_CONSUMPTION_DIR=../consume|PAPERLESS_CONSUMPTION_DIR=/op
|
||||
sed -i -e "s|#PAPERLESS_DATA_DIR=../data|PAPERLESS_DATA_DIR=/opt/paperless/data|" /opt/paperless/paperless.conf
|
||||
sed -i -e "s|#PAPERLESS_MEDIA_ROOT=../media|PAPERLESS_MEDIA_ROOT=/opt/paperless/media|" /opt/paperless/paperless.conf
|
||||
sed -i -e "s|#PAPERLESS_STATICDIR=../static|PAPERLESS_STATICDIR=/opt/paperless/static|" /opt/paperless/paperless.conf
|
||||
echo "${Paperlessngx}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Paperless-ngx"
|
||||
|
||||
msg_info "Installing Natural Language Toolkit (Patience)"
|
||||
@@ -99,13 +100,15 @@ $STD python3 -m nltk.downloader -d /usr/share/nltk_data all
|
||||
msg_ok "Installed Natural Language Toolkit"
|
||||
|
||||
msg_info "Setting up PostgreSQL database"
|
||||
export LC_ALL=C.UTF-8
|
||||
DB_NAME=paperlessdb
|
||||
DB_USER=paperless
|
||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
echo "" >>~/paperless.creds
|
||||
echo -e "Paperless-ngx Database User: \e[32m$DB_USER\e[0m" >>~/paperless.creds
|
||||
echo -e "Paperless-ngx Database Password: \e[32m$DB_PASS\e[0m" >>~/paperless.creds
|
||||
|
||||
Reference in New Issue
Block a user