Compare commits

..

9 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
dc70bc1327 fix(databasus): only patch service EnvironmentFile if not already updated
Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/47c48b0f-1527-4b9c-a6f5-74c789e79785

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
2026-05-04 19:27:25 +00:00
copilot-swe-agent[bot]
32bee2c7a7 fix(databasus): update service EnvironmentFile path in update_script
Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/b4dcde99-e021-40ce-bdbd-3afc224ab6d4

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
2026-05-04 19:14:39 +00:00
copilot-swe-agent[bot]
5039e0fd17 Fix Databasus .env file location so service starts correctly
Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/5b4ddcc8-18a3-49b4-9281-b14c712ebb7f

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
2026-05-04 18:57:37 +00:00
copilot-swe-agent[bot]
980dd572ab Initial plan 2026-05-04 18:50:42 +00:00
community-scripts-pr-app[bot]
812f8ed1c7 Update CHANGELOG.md (#14250)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-04 18:32:54 +00:00
CanbiZ (MickLesk)
75c5aa3d5d tools.func: add GitLab release check/fetch/deploy helpers (#14242) 2026-05-04 20:32:15 +02:00
MickLesk
12e7cb1777 fix(databasus): disable corepack download prompt to prevent install hang 2026-05-04 19:16:39 +02:00
community-scripts-pr-app[bot]
7f9e1ce4d8 Update CHANGELOG.md (#14245)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-04 16:35:42 +00:00
CanbiZ (MickLesk)
d118f101d8 Databasus: update mongo-tools fallback to 100.16.1 and use now pnpm instead of npm ci (#14240)
Co-authored-by: MickLesk <mickey.leskowitz@levelbuild.com>
2026-05-04 18:35:02 +02:00
3 changed files with 40 additions and 13 deletions

View File

@@ -458,6 +458,20 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-05-04
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Databasus: update mongo-tools fallback to 100.16.1 and use now pnpm instead of npm ci [@MickLesk](https://github.com/MickLesk) ([#14240](https://github.com/community-scripts/ProxmoxVE/pull/14240))
### 💾 Core
- #### ✨ New Features
- tools.func: add GitLab release check/fetch/deploy helpers [@MickLesk](https://github.com/MickLesk) ([#14242](https://github.com/community-scripts/ProxmoxVE/pull/14242))
## 2026-05-03
### 🚀 Updated Scripts

View File

@@ -35,7 +35,8 @@ function update_script() {
msg_ok "Stopped Databasus"
msg_info "Backing up Configuration"
cp /opt/databasus/.env /opt/databasus.env.bak
cp /.env /opt/databasus.env.bak
chmod 600 /opt/databasus.env.bak
msg_ok "Backed up Configuration"
msg_info "Ensuring Database Clients"
@@ -46,7 +47,7 @@ function update_script() {
# Install MongoDB Database Tools via direct .deb (no APT repo for Debian 13)
if ! command -v mongodump &>/dev/null; then
[[ "$(get_os_info id)" == "ubuntu" ]] && MONGO_DIST="ubuntu2204" || MONGO_DIST="debian12"
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-100.14.1.deb"
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-100.16.1.deb"
fi
[[ -f /usr/bin/mongodump ]] && ln -sf /usr/bin/mongodump /usr/local/mongodb-database-tools/bin/mongodump
[[ -f /usr/bin/mongorestore ]] && ln -sf /usr/bin/mongorestore /usr/local/mongodb-database-tools/bin/mongorestore
@@ -66,9 +67,12 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
msg_info "Updating Databasus"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
cd /opt/databasus/frontend
$STD npm ci
$STD npm run build
$STD corepack enable
$STD corepack prepare pnpm@latest --activate
$STD pnpm install --frozen-lockfile
$STD pnpm run build
cd /opt/databasus/backend
$STD go mod download
$STD /root/go/bin/swag init -g cmd/main.go -o swagger
@@ -81,11 +85,18 @@ function update_script() {
msg_ok "Updated Databasus"
msg_info "Restoring Configuration"
cp /opt/databasus.env.bak /opt/databasus/.env
cp /opt/databasus.env.bak /.env
rm -f /opt/databasus.env.bak
chown postgres:postgres /opt/databasus/.env
chmod 600 /.env
msg_ok "Restored Configuration"
if ! grep -q "EnvironmentFile=/.env" /etc/systemd/system/databasus.service; then
msg_info "Updating Service"
sed -i 's|EnvironmentFile=.*|EnvironmentFile=/.env|' /etc/systemd/system/databasus.service
$STD systemctl daemon-reload
msg_ok "Updated Service"
fi
msg_info "Starting Databasus"
$STD systemctl start databasus
msg_ok "Started Databasus"

View File

@@ -32,7 +32,7 @@ for v in 12 13 14 15 16 18; do
done
# Install MongoDB Database Tools via direct .deb (no APT repo for Debian 13)
[[ "$(get_os_info id)" == "ubuntu" ]] && MONGO_DIST="ubuntu2204" || MONGO_DIST="debian12"
MONGO_VERSION=$(get_latest_gh_tag "mongodb/mongo-tools" "100." || echo "100.14.1")
MONGO_VERSION=$(get_latest_gh_tag "mongodb/mongo-tools" "100." || echo "100.16.1")
fetch_and_deploy_from_url "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-${MONGO_DIST}-x86_64-${MONGO_VERSION}.deb" ""
mkdir -p /usr/local/mongodb-database-tools/bin
[[ -f /usr/bin/mongodump ]] && ln -sf /usr/bin/mongodump /usr/local/mongodb-database-tools/bin/mongodump
@@ -52,9 +52,12 @@ msg_ok "Installed Database Clients"
fetch_and_deploy_gh_release "databasus" "databasus/databasus" "tarball" "latest" "/opt/databasus"
msg_info "Building Databasus (Patience)"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
cd /opt/databasus/frontend
$STD npm ci
$STD npm run build
$STD corepack enable
$STD corepack prepare pnpm@latest --activate
$STD pnpm install --frozen-lockfile
$STD pnpm run build
cd /opt/databasus/backend
$STD go mod tidy
$STD go mod download
@@ -76,7 +79,7 @@ ENCRYPTION_KEY=$(openssl rand -hex 32)
# Install goose for migrations
$STD go install github.com/pressly/goose/v3/cmd/goose@latest
ln -sf /root/go/bin/goose /usr/local/bin/goose
cat <<EOF >/opt/databasus/.env
cat <<EOF >/.env
# Environment
ENV_MODE=production
@@ -106,8 +109,7 @@ DATA_DIR=/databasus-data/data
BACKUP_DIR=/databasus-data/backups
LOG_DIR=/databasus-data/logs
EOF
chown postgres:postgres /opt/databasus/.env
chmod 600 /opt/databasus/.env
chmod 600 /.env
msg_ok "Configured Databasus"
msg_info "Configuring Valkey"
@@ -145,7 +147,7 @@ Requires=postgresql.service valkey.service
[Service]
Type=simple
WorkingDirectory=/opt/databasus
EnvironmentFile=/opt/databasus/.env
EnvironmentFile=/.env
ExecStart=/opt/databasus/databasus
Restart=always
RestartSec=5