mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-30 22:19:41 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51fc861b0f |
+2
-3
@@ -54,9 +54,8 @@ function update_script() {
|
||||
$STD uv venv --clear .venv
|
||||
$STD .venv/bin/python -m ensurepip --upgrade
|
||||
fi
|
||||
$STD .venv/bin/python -m pip install --upgrade pip
|
||||
$STD .venv/bin/python -m pip install -r requirements.txt
|
||||
$STD .venv/bin/python -m pip install 'djangorestframework<3.15'
|
||||
$STD uv pip install --python .venv/bin/python -r requirements.txt
|
||||
$STD uv pip install --python .venv/bin/python 'djangorestframework<3.15'
|
||||
$STD .venv/bin/python -m manage collectstatic --noinput
|
||||
$STD .venv/bin/python -m manage migrate
|
||||
|
||||
|
||||
@@ -56,12 +56,11 @@ function update_script() {
|
||||
rm -rf "$VENV_PATH"
|
||||
$STD uv venv --clear "$VENV_PATH"
|
||||
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
|
||||
$STD "$VENV_PATH/bin/python" -m pip install changedetection.io playwright
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" changedetection.io playwright
|
||||
msg_ok "Migrated to uv/venv"
|
||||
else
|
||||
msg_info "Updating ${APP}"
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade changedetection.io playwright
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" --upgrade changedetection.io playwright
|
||||
msg_ok "Updated ${APP}"
|
||||
fi
|
||||
|
||||
|
||||
+2
-3
@@ -48,13 +48,12 @@ function update_script() {
|
||||
cd /opt/esphome
|
||||
$STD uv venv --clear "$VENV_PATH"
|
||||
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
|
||||
$STD "$VENV_PATH/bin/python" -m pip install esphome esphome-device-builder esptool
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" esphome esphome-device-builder esptool
|
||||
msg_ok "Migrated to uv/venv"
|
||||
else
|
||||
msg_info "Updating ESPHome Device Builder"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
$STD "$VENV_PATH/bin/python" -m pip install --upgrade esphome esphome-device-builder esptool
|
||||
$STD uv pip install --python "$VENV_PATH/bin/python" --upgrade esphome esphome-device-builder esptool
|
||||
msg_ok "Updated ESPHome Device Builder"
|
||||
fi
|
||||
|
||||
|
||||
+1
-2
@@ -56,8 +56,7 @@ function update_script() {
|
||||
cd /opt/fireshare
|
||||
$STD uv venv --clear
|
||||
$STD .venv/bin/python -m ensurepip --upgrade
|
||||
$STD .venv/bin/python -m pip install --upgrade --break-system-packages pip
|
||||
$STD .venv/bin/python -m pip install --no-cache-dir --break-system-packages --ignore-installed app/server
|
||||
$STD uv pip install --python .venv/bin/python --no-cache --reinstall app/server
|
||||
cp .venv/bin/fireshare /usr/local/bin/fireshare
|
||||
set -a
|
||||
source /opt/fireshare/fireshare.env
|
||||
|
||||
@@ -38,13 +38,12 @@ function update_script() {
|
||||
cd "$INSTALL_DIR"
|
||||
$STD uv venv --clear .venv
|
||||
$STD "$VENV_PYTHON" -m ensurepip --upgrade
|
||||
$STD "$VENV_PYTHON" -m pip install --upgrade pip
|
||||
$STD "$VENV_PYTHON" -m pip install jupyter
|
||||
$STD uv pip install --python "$VENV_PYTHON" jupyter
|
||||
msg_ok "Migrated to uv and installed Jupyter"
|
||||
else
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
msg_info "Updating Jupyter"
|
||||
$STD "$VENV_PYTHON" -m pip install --upgrade pip
|
||||
$STD "$VENV_PYTHON" -m pip install --upgrade jupyter
|
||||
$STD uv pip install --python "$VENV_PYTHON" --upgrade jupyter
|
||||
msg_ok "Jupyter updated"
|
||||
fi
|
||||
|
||||
|
||||
@@ -45,13 +45,12 @@ function update_script() {
|
||||
cd /opt/prometheus-pve-exporter
|
||||
$STD uv venv --clear "$PVE_VENV_PATH"
|
||||
$STD "$PVE_VENV_PATH/bin/python" -m ensurepip --upgrade
|
||||
$STD "$PVE_VENV_PATH/bin/python" -m pip install --upgrade pip
|
||||
$STD "$PVE_VENV_PATH/bin/python" -m pip install prometheus-pve-exporter
|
||||
$STD uv pip install --python "$PVE_VENV_PATH/bin/python" prometheus-pve-exporter
|
||||
msg_ok "Migrated to uv/venv"
|
||||
else
|
||||
msg_info "Updating Prometheus Proxmox VE Exporter"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
$STD "$PVE_VENV_PATH/bin/python" -m pip install --upgrade prometheus-pve-exporter
|
||||
$STD uv pip install --python "$PVE_VENV_PATH/bin/python" --upgrade prometheus-pve-exporter
|
||||
msg_ok "Updated Prometheus Proxmox VE Exporter"
|
||||
fi
|
||||
local service_file="/etc/systemd/system/prometheus-pve-exporter.service"
|
||||
|
||||
+1
-2
@@ -42,8 +42,7 @@ function update_script() {
|
||||
cd /opt/scraparr
|
||||
$STD uv venv --clear /opt/scraparr/.venv
|
||||
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt
|
||||
$STD uv pip install --python /opt/scraparr/.venv/bin/python -r /opt/scraparr/src/scraparr/requirements.txt
|
||||
chmod -R 755 /opt/scraparr
|
||||
msg_ok "Updated Scraparr"
|
||||
|
||||
|
||||
@@ -60,9 +60,8 @@ cd /opt/adventurelog/backend/server
|
||||
mkdir -p /opt/adventurelog/backend/server/media
|
||||
$STD uv venv --clear /opt/adventurelog/backend/server/.venv
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install -r requirements.txt
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m pip install 'djangorestframework<3.15'
|
||||
$STD uv pip install --python /opt/adventurelog/backend/server/.venv/bin/python -r requirements.txt
|
||||
$STD uv pip install --python /opt/adventurelog/backend/server/.venv/bin/python 'djangorestframework<3.15'
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage collectstatic --noinput
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage migrate
|
||||
$STD /opt/adventurelog/backend/server/.venv/bin/python -m manage download-countries
|
||||
|
||||
@@ -60,8 +60,7 @@ msg_info "Installing Change Detection"
|
||||
mkdir -p /opt/changedetection
|
||||
$STD uv venv --clear /opt/changedetection/.venv
|
||||
$STD /opt/changedetection/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
|
||||
$STD uv pip install --python /opt/changedetection/.venv/bin/python changedetection.io
|
||||
cat <<EOF >/opt/changedetection/.env
|
||||
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
|
||||
@@ -71,7 +70,7 @@ msg_ok "Installed Change Detection"
|
||||
|
||||
msg_info "Installing Browserless & Playwright"
|
||||
mkdir /opt/browserless
|
||||
$STD /opt/changedetection/.venv/bin/python -m pip install playwright
|
||||
$STD uv pip install --python /opt/changedetection/.venv/bin/python playwright
|
||||
$STD git clone https://github.com/browserless/chrome /opt/browserless
|
||||
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
|
||||
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
|
||||
|
||||
@@ -26,8 +26,7 @@ mkdir -p /root/config
|
||||
cd /opt/esphome
|
||||
$STD uv venv --clear /opt/esphome/.venv
|
||||
$STD /opt/esphome/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/esphome/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/esphome/.venv/bin/python -m pip install esphome esphome-device-builder esptool
|
||||
$STD uv pip install --python /opt/esphome/.venv/bin/python esphome esphome-device-builder esptool
|
||||
msg_ok "Setup and Installed ESPHome Device Builder"
|
||||
|
||||
msg_info "Linking esphome to /usr/local/bin"
|
||||
|
||||
@@ -98,7 +98,6 @@ mkdir -p /opt/fireshare-{data,videos,images,processed}
|
||||
cd /opt/fireshare
|
||||
$STD uv venv
|
||||
$STD .venv/bin/python -m ensurepip --upgrade
|
||||
$STD .venv/bin/python -m pip install --upgrade --break-system-packages pip
|
||||
ln -sf /usr/local/bin/ffmpeg /usr/bin/ffmpeg
|
||||
ln -sf /usr/local/bin/ffprobe /usr/bin/ffprobe
|
||||
echo "/usr/local/lib" >/etc/ld.so.conf.d/usr-local.conf
|
||||
@@ -106,7 +105,7 @@ echo "/usr/local/cuda/lib64" >>/etc/ld.so.conf.d/usr-local.conf
|
||||
echo "/usr/local/nvidia/lib" >>/etc/ld.so.conf.d/nvidia.conf
|
||||
echo "/usr/local/nvidia/lib64" >>/etc/ld.so.conf.d/nvidia.conf
|
||||
ldconfig
|
||||
$STD .venv/bin/python -m pip install --no-cache-dir --break-system-packages --ignore-installed app/server
|
||||
$STD uv pip install --python .venv/bin/python --no-cache --reinstall app/server
|
||||
cp .venv/bin/fireshare /usr/local/bin/fireshare
|
||||
export FLASK_APP="/opt/fireshare/app/server/fireshare:create_app()"
|
||||
export DATA_DIRECTORY=/opt/fireshare-data
|
||||
|
||||
+18
-4
@@ -24,8 +24,22 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=glpi_db
|
||||
DB_USER=glpi
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
||||
MARIADB_DB_NAME="glpi_db" MARIADB_DB_USER="glpi" MARIADB_DB_EXTRA_GRANTS="GRANT SELECT ON \`mysql\`.\`time_zone_name\`" MARIADB_DB_CREDS_FILE="$HOME/glpi_db.creds" setup_mariadb_db
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
|
||||
$STD mariadb -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
cat <<EOF >~/glpi_db.creds
|
||||
GLPI Database Credentials
|
||||
Database: $DB_NAME
|
||||
Username: $DB_USER
|
||||
Password: $DB_PASS
|
||||
EOF
|
||||
msg_ok "Set up database"
|
||||
|
||||
msg_info "Installing GLPi"
|
||||
cd /opt
|
||||
@@ -71,9 +85,9 @@ msg_ok "Configured Downstream file"
|
||||
msg_info "Configuring GLPI Database"
|
||||
$STD /usr/bin/php /opt/glpi/bin/console db:install \
|
||||
--db-host=localhost \
|
||||
--db-name=glpi_db \
|
||||
--db-user=glpi \
|
||||
--db-password=$MARIADB_DB_PASS \
|
||||
--db-name=$DB_NAME \
|
||||
--db-user=$DB_USER \
|
||||
--db-password=$DB_PASS \
|
||||
--default-language=en_US \
|
||||
--no-interaction \
|
||||
--allow-superuser \
|
||||
|
||||
@@ -20,8 +20,7 @@ mkdir -p /opt/jupyter
|
||||
cd /opt/jupyter
|
||||
$STD uv venv --clear /opt/jupyter/.venv
|
||||
$STD /opt/jupyter/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/jupyter/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/jupyter/.venv/bin/python -m pip install jupyter
|
||||
$STD uv pip install --python /opt/jupyter/.venv/bin/python jupyter
|
||||
ln -s /opt/jupyter/.venv/bin/jupyter /usr/local/bin/jupyter
|
||||
ln -s /opt/jupyter/.venv/bin/jupyter-lab /usr/local/bin/jupyter-lab
|
||||
ln -s /opt/jupyter/.venv/bin/jupyter-notebook /usr/local/bin/jupyter-notebook
|
||||
|
||||
@@ -16,7 +16,14 @@ update_os
|
||||
JAVA_VERSION=21 setup_java
|
||||
PG_VERSION=16 setup_postgresql
|
||||
|
||||
PG_DB_NAME="keycloak" PG_DB_USER="keycloak" setup_postgresql_db
|
||||
msg_info "Configuring PostgreSQL"
|
||||
DB_NAME="keycloak"
|
||||
DB_USER="keycloak"
|
||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8';"
|
||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
|
||||
msg_ok "Configured PostgreSQL"
|
||||
|
||||
fetch_and_deploy_gh_release "keycloak_app" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz"
|
||||
|
||||
@@ -36,8 +43,8 @@ Restart=always
|
||||
RestartSec=3
|
||||
Environment="JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-$(arch_resolve)"
|
||||
Environment="KC_DB=postgres"
|
||||
Environment="KC_DB_USERNAME=keycloak"
|
||||
Environment="KC_DB_PASSWORD=$PG_DB_PASS"
|
||||
Environment="KC_DB_USERNAME=$DB_USER"
|
||||
Environment="KC_DB_PASSWORD=$DB_PASS"
|
||||
Environment="KC_HTTP_ENABLED=true"
|
||||
Environment="KC_BOOTSTRAP_ADMIN_USERNAME=tmpadm"
|
||||
Environment="KC_BOOTSTRAP_ADMIN_PASSWORD=admin123"
|
||||
|
||||
@@ -25,8 +25,21 @@ setup_mariadb
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
|
||||
setup_composer
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=kimai_db
|
||||
DB_USER=kimai
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
MYSQL_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||
MARIADB_DB_NAME="kimai_db" MARIADB_DB_USER="kimai" setup_mariadb_db
|
||||
$STD mariadb -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
cat <<EOF >~/kimai.creds
|
||||
Kimai-Credentials
|
||||
Kimai Database User: $DB_USER
|
||||
Kimai Database Password: $DB_PASS
|
||||
Kimai Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up database"
|
||||
|
||||
fetch_and_deploy_gh_release "kimai" "kimai/kimai" "tarball"
|
||||
|
||||
@@ -37,7 +50,7 @@ echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc
|
||||
source ~/.bashrc
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
cp .env.dist .env
|
||||
sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://kimai:$MARIADB_DB_PASS@127.0.0.1:3306/kimai_db?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env
|
||||
sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://$DB_USER:$DB_PASS@127.0.0.1:3306/$DB_NAME?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env
|
||||
sed -i "s|^APP_SECRET=.*|APP_SECRET=$APP_SECRET|" /opt/kimai/.env
|
||||
$STD bin/console kimai:install -n
|
||||
$STD expect <<EOF
|
||||
|
||||
@@ -16,7 +16,20 @@ update_os
|
||||
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap" setup_php
|
||||
setup_mariadb
|
||||
|
||||
MARIADB_DB_NAME="limesurvey_db" MARIADB_DB_USER="limesurvey" setup_mariadb_db
|
||||
msg_info "Configuring MariaDB Database"
|
||||
DB_NAME=limesurvey_db
|
||||
DB_USER=limesurvey
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
cat <<EOF >~/limesurvey.creds
|
||||
LimeSurvey-Credentials
|
||||
LimeSurvey Database User: $DB_USER
|
||||
LimeSurvey Database Password: $DB_PASS
|
||||
LimeSurvey Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Configured MariaDB Database"
|
||||
|
||||
msg_info "Setting up LimeSurvey"
|
||||
temp_file=$(mktemp)
|
||||
|
||||
@@ -15,14 +15,26 @@ update_os
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
|
||||
PG_DB_NAME="listmonk" PG_DB_USER="listmonk" setup_postgresql_db
|
||||
msg_info "Configuring PostgreSQL"
|
||||
DB_NAME=listmonk
|
||||
DB_USER=listmonk
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
$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;"
|
||||
cat <<EOF >~/listmonk.creds
|
||||
listmonk-Credentials
|
||||
listmonk Database User: $DB_USER
|
||||
listmonk Database Password: $DB_PASS
|
||||
listmonk Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Configured PostgreSQL"
|
||||
|
||||
fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Configuring listmonk"
|
||||
mkdir -p /opt/listmonk/uploads
|
||||
$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml
|
||||
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$PG_DB_PASS"'"/' /opt/listmonk/config.toml
|
||||
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml
|
||||
$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml
|
||||
msg_ok "Configured listmonk"
|
||||
|
||||
|
||||
@@ -20,18 +20,31 @@ msg_ok "Installed dependencies"
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
setup_mariadb
|
||||
|
||||
MARIADB_DB_NAME="mmdl" MARIADB_DB_USER="mmdl" MARIADB_DB_CREDS_FILE="$HOME/mmdl.creds" setup_mariadb_db
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME="mmdl"
|
||||
DB_USER="mmdl"
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED by '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
cat <<EOF >~/mmdl.creds
|
||||
Manage My Damn Life Credentials
|
||||
Database User: $DB_USER
|
||||
Database Password: $DB_PASS
|
||||
Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "mmdl" "intri-in/manage-my-damn-life-nextjs" "tarball"
|
||||
|
||||
msg_info "Configuring ${APPLICATION}"
|
||||
cp /opt/mmdl/sample.env.local /opt/mmdl/.env
|
||||
sed -i -e 's|db|localhost|' \
|
||||
-e "s|myuser|mmdl|" \
|
||||
-e "s|mypassword|${MARIADB_DB_PASS}|" \
|
||||
-e "s|myuser|${DB_USER}|" \
|
||||
-e "s|mypassword|${DB_PASS}|" \
|
||||
-e 's|5433|3306|' \
|
||||
-e 's|DB_DIALECT=postgres|DB_DIALECT=mysql|' \
|
||||
-e "s|sample_install_mmdm|mmdl|" \
|
||||
-e "s|sample_install_mmdm|${DB_NAME}|" \
|
||||
-e "s|=PASSWORD|=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9' | head -c40)|" \
|
||||
/opt/mmdl/.env
|
||||
cd /opt/mmdl
|
||||
|
||||
@@ -26,7 +26,22 @@ fi
|
||||
|
||||
PG_VERSION="16" setup_postgresql
|
||||
|
||||
PG_DB_NAME="mattermost" PG_DB_USER="mmuser" setup_postgresql_db
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME=mattermost
|
||||
DB_USER=mmuser
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
|
||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;"
|
||||
cat <<EOF >~/mattermost.creds
|
||||
Mattermost Credentials
|
||||
Database User: $DB_USER
|
||||
Database Password: $DB_PASS
|
||||
Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
msg_info "Installing Mattermost"
|
||||
curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
|
||||
@@ -34,7 +49,7 @@ sh -c 'curl -fsSL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash
|
||||
apt_update_safe
|
||||
$STD apt install -y mattermost
|
||||
$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json
|
||||
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://mmuser:$PG_DB_PASS@localhost:5432/mattermost?sslmode=disable&connect_timeout=10\"," \
|
||||
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \
|
||||
-e "/SiteURL/c\ \"SiteURL\": \"http://$LOCAL_IP:8065\"," /opt/mattermost/config/config.json
|
||||
systemctl enable -q --now mattermost
|
||||
msg_ok "Installed Mattermost"
|
||||
|
||||
@@ -22,7 +22,20 @@ setup_yq
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
PG_VERSION="17" setup_postgresql
|
||||
|
||||
PG_DB_NAME="mm_db" PG_DB_USER="mm_user" setup_postgresql_db
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME="mm_db"
|
||||
DB_USER="mm_user"
|
||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
$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 "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
cat <<EOF >~/mediamanager.creds
|
||||
MediaManager Credentials
|
||||
MediaManager Database User: $DB_USER
|
||||
MediaManager Database Password: $DB_PASS
|
||||
MediaManager Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
fetch_and_deploy_gh_release "MediaManager" "maxdorninger/MediaManager" "tarball" "latest" "/opt/mediamanager"
|
||||
UV_PROJECT_DIR="/opt/mediamanager" setup_uv
|
||||
@@ -52,9 +65,9 @@ SECRET="$(openssl rand -hex 32)"
|
||||
sed -e "s/localhost:8/$LOCAL_IP:8/g" \
|
||||
-e "s|/data/|$MEDIA_DIR/|g" \
|
||||
-e 's/"db"/"localhost"/' \
|
||||
-e "s/user = \"MediaManager\"/user = \"mm_user\"/" \
|
||||
-e "s/password = \"MediaManager\"/password = \"$PG_DB_PASS\"/" \
|
||||
-e "s/dbname = \"MediaManager\"/dbname = \"mm_db\"/" \
|
||||
-e "s/user = \"MediaManager\"/user = \"$DB_USER\"/" \
|
||||
-e "s/password = \"MediaManager\"/password = \"$DB_PASS\"/" \
|
||||
-e "s/dbname = \"MediaManager\"/dbname = \"$DB_NAME\"/" \
|
||||
-e "/^token_secret/s/=.*/= \"$SECRET\"/" \
|
||||
-e "s/admin@example.com/$EMAIL/" \
|
||||
-e '/^admin_emails/s/, .*/]/' \
|
||||
|
||||
@@ -32,8 +32,7 @@ msg_info "Installing Mylar3"
|
||||
mkdir -p /opt/mylar3-data
|
||||
$STD uv venv --clear /opt/mylar3/.venv
|
||||
$STD /opt/mylar3/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/mylar3/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/mylar3/.venv/bin/python -m pip install --no-cache-dir -r /opt/mylar3/requirements.txt
|
||||
$STD uv pip install --python /opt/mylar3/.venv/bin/python --no-cache -r /opt/mylar3/requirements.txt
|
||||
msg_ok "Installed Mylar3"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
+18
-3
@@ -29,14 +29,29 @@ curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.lates
|
||||
$STD apt install -y /opt/odoo.deb
|
||||
msg_ok "Setup Odoo $RELEASE"
|
||||
|
||||
PG_DB_NAME="odoo" PG_DB_USER="odoo_usr" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
||||
msg_info "Setup PostgreSQL Database"
|
||||
DB_NAME="odoo"
|
||||
DB_USER="odoo_usr"
|
||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
|
||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
|
||||
cat <<EOF >~/odoo.creds
|
||||
Odoo-Credentials
|
||||
Odoo Database User: $DB_USER
|
||||
Odoo Database Password: $DB_PASS
|
||||
Odoo Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Setup PostgreSQL"
|
||||
|
||||
msg_info "Configuring Odoo"
|
||||
sed -i \
|
||||
-e "s|^;*db_host *=.*|db_host = localhost|" \
|
||||
-e "s|^;*db_port *=.*|db_port = 5432|" \
|
||||
-e "s|^;*db_user *=.*|db_user = odoo_usr|" \
|
||||
-e "s|^;*db_password *=.*|db_password = $PG_DB_PASS|" \
|
||||
-e "s|^;*db_user *=.*|db_user = $DB_USER|" \
|
||||
-e "s|^;*db_password *=.*|db_password = $DB_PASS|" \
|
||||
/etc/odoo/odoo.conf
|
||||
$STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init
|
||||
rm -f /opt/odoo.deb
|
||||
|
||||
@@ -21,7 +21,22 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="16" setup_postgresql
|
||||
|
||||
PG_DB_NAME="onlyoffice" PG_DB_USER="onlyoffice_user" setup_postgresql_db
|
||||
msg_info "Setup Database"
|
||||
DB_NAME=onlyoffice
|
||||
DB_USER=onlyoffice_user
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
$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 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'"
|
||||
cat <<EOF >~/onlyoffice.creds
|
||||
ONLYOFFICE-Credentials
|
||||
ONLYOFFICE Database User: $DB_USER
|
||||
ONLYOFFICE Database Password: $DB_PASS
|
||||
ONLYOFFICE Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up Database"
|
||||
|
||||
msg_info "Adding ONLYOFFICE GPG Key"
|
||||
GPG_TMP="/tmp/onlyoffice.gpg"
|
||||
@@ -57,16 +72,16 @@ $STD rabbitmqctl set_permissions -p / $RMQ_USER ".*" ".*" ".*"
|
||||
$STD rabbitmqctl set_user_tags $RMQ_USER administrator
|
||||
|
||||
echo onlyoffice-documentserver onlyoffice/db-host string localhost | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-user string onlyoffice_user | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-pwd password $PG_DB_PASS | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-name string onlyoffice | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-user string $DB_USER | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-pwd password $DB_PASS | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/db-name string $DB_NAME | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-host string localhost | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-user string $RMQ_USER | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password $RMQ_PASS | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections
|
||||
echo onlyoffice-documentserver onlyoffice/jwt-secret password $JWT_SECRET | debconf-set-selections
|
||||
|
||||
cat <<EOF >>~/onlyoffice.creds
|
||||
cat <<EOF >~/onlyoffice.creds
|
||||
|
||||
ONLYOFFICE RabbitMQ Credentials
|
||||
User: $RMQ_USER
|
||||
|
||||
@@ -27,18 +27,28 @@ setup_composer
|
||||
fetch_and_deploy_gh_release "paymenter" "paymenter/paymenter" "prebuild" "latest" "/opt/paymenter" "paymenter.tar.gz"
|
||||
chmod -R 755 /opt/paymenter/storage/* /opt/paymenter/bootstrap/cache/
|
||||
|
||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
||||
MARIADB_DB_NAME="paymenter" MARIADB_DB_USER="paymenter" MARIADB_DB_CREDS_FILE="$HOME/paymenter_db.creds" setup_mariadb_db
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=paymenter
|
||||
DB_USER=paymenter
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;"
|
||||
cat <<EOF >~/paymenter_db.creds
|
||||
Paymenter Database Credentials
|
||||
Database: $DB_NAME
|
||||
Username: $DB_USER
|
||||
Password: $DB_PASS
|
||||
EOF
|
||||
cd /opt/paymenter
|
||||
cp .env.example .env
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD php artisan key:generate --force
|
||||
$STD php artisan storage:link
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=paymenter/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=paymenter/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${MARIADB_DB_PASS}/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=${DB_NAME}/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" .env
|
||||
$STD php artisan migrate --force --seed
|
||||
msg_ok "Set up database"
|
||||
|
||||
|
||||
@@ -23,7 +23,22 @@ msg_ok "Installed dependencies"
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
|
||||
PG_DB_NAME="planka" PG_DB_USER="planka" setup_postgresql_db
|
||||
msg_info "Setting up PostgreSQL Database"
|
||||
DB_NAME=planka
|
||||
DB_USER=planka
|
||||
DB_PASS=$(openssl rand -base64 16 | tr -d '/+=')
|
||||
$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 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'"
|
||||
cat <<EOF >~/planka.creds
|
||||
PLANKA DB Credentials
|
||||
PLANKA Database User: $DB_USER
|
||||
PLANKA Database Password: $DB_PASS
|
||||
PLANKA Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
|
||||
|
||||
@@ -33,7 +48,7 @@ cd /opt/planka
|
||||
$STD npm install
|
||||
cp .env.sample .env
|
||||
sed -i "s#http://localhost:1337#http://$LOCAL_IP:1337#g" /opt/planka/.env
|
||||
sed -i "s#postgres@localhost#planka:$PG_DB_PASS@localhost#g" /opt/planka/.env
|
||||
sed -i "s#postgres@localhost#planka:$DB_PASS@localhost#g" /opt/planka/.env
|
||||
sed -i "s#notsecretkey#$SECRET_KEY#g" /opt/planka/.env
|
||||
mkdir -p /opt/planka/data/protected/{favicons,user-avatars,background-images} /opt/planka/data/private/attachments
|
||||
$STD npm run db:init
|
||||
@@ -52,7 +67,7 @@ echo "DEFAULT_ADMIN_NAME=$ADMIN_NAME" >>.env
|
||||
echo "DEFAULT_ADMIN_USERNAME=$ADMIN_USERNAME" >>.env
|
||||
$STD npm run db:seed
|
||||
sed -i '/# Temporary admin user creation settings/,$d' .env
|
||||
cat <<EOF >>~/planka.creds
|
||||
cat <<EOF >~/planka.creds
|
||||
|
||||
PLANKA Admin Credentials
|
||||
Admin Email: $ADMIN_EMAIL
|
||||
|
||||
@@ -21,8 +21,7 @@ cd /opt/prometheus-pve-exporter
|
||||
|
||||
$STD uv venv --clear /opt/prometheus-pve-exporter/.venv
|
||||
$STD /opt/prometheus-pve-exporter/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/prometheus-pve-exporter/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/prometheus-pve-exporter/.venv/bin/python -m pip install prometheus-pve-exporter
|
||||
$STD uv pip install --python /opt/prometheus-pve-exporter/.venv/bin/python prometheus-pve-exporter
|
||||
cat <<EOF >/opt/prometheus-pve-exporter/pve.yml
|
||||
default:
|
||||
user: prometheus@pve
|
||||
|
||||
@@ -45,7 +45,20 @@ $STD apt install -y \
|
||||
libapache2-mod-php8.4
|
||||
msg_ok "Installed PHP"
|
||||
|
||||
MARIADB_DB_NAME="panel" MARIADB_DB_USER="pterodactyl" MARIADB_DB_CREDS_FILE="$HOME/pterodactyl-panel.creds" setup_mariadb_db
|
||||
msg_info "Setting up MariaDB"
|
||||
DB_NAME=panel
|
||||
DB_USER=pterodactyl
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
cat <<EOF >~/pterodactyl-panel.creds
|
||||
pterodactyl Panel-Credentials
|
||||
pterodactyl Panel Database User: $DB_USER
|
||||
pterodactyl Panel Database Password: $DB_PASS
|
||||
pterodactyl Panel Database Name: $DB_NAME
|
||||
EOF
|
||||
msg_ok "Set up MariaDB"
|
||||
|
||||
read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL
|
||||
read -p "${TAB3}Enter your First Name: " NAME_FIRST
|
||||
@@ -62,14 +75,14 @@ ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD php artisan key:generate --force
|
||||
$STD php artisan p:environment:setup --no-interaction --author "$ADMIN_EMAIL" --url "http://$LOCAL_IP"
|
||||
$STD php artisan p:environment:database --no-interaction --database panel --username pterodactyl --password "$MARIADB_DB_PASS"
|
||||
$STD php artisan p:environment:database --no-interaction --database $DB_NAME --username $DB_USER --password "$DB_PASS"
|
||||
$STD php artisan migrate --seed --force --no-interaction
|
||||
$STD php artisan p:user:make --no-interaction --admin=1 --email "$ADMIN_EMAIL" --password "$ADMIN_PASS" --name-first "$NAME_FIRST" --name-last "$NAME_LAST" --username "admin"
|
||||
echo "* * * * * php /opt/pterodactyl-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
||||
chown -R www-data:www-data /opt/pterodactyl-panel/*
|
||||
chmod -R 755 /opt/pterodactyl-panel/storage/* /opt/pterodactyl-panel/bootstrap/cache/
|
||||
ln -s /opt/pterodactyl-panel /var/www/pterodactyl
|
||||
cat <<EOF >>~/pterodactyl-panel.creds
|
||||
cat <<EOF >~/pterodactyl-panel.creds
|
||||
|
||||
pterodactyl Admin Username: admin
|
||||
pterodactyl Admin Email: $ADMIN_EMAIL
|
||||
|
||||
@@ -20,8 +20,7 @@ msg_info "Installing Scraparr"
|
||||
cd /opt/scraparr
|
||||
$STD uv venv --clear /opt/scraparr/.venv
|
||||
$STD /opt/scraparr/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/scraparr/.venv/bin/python -m pip install -r /opt/scraparr/src/scraparr/requirements.txt
|
||||
$STD uv pip install --python /opt/scraparr/.venv/bin/python -r /opt/scraparr/src/scraparr/requirements.txt
|
||||
chmod -R 755 /opt/scraparr
|
||||
mkdir -p /scraparr/config
|
||||
mv /opt/scraparr/config.yaml /scraparr/config/config.yaml
|
||||
|
||||
Reference in New Issue
Block a user