Compare commits

..

1 Commits

Author SHA1 Message Date
Slaviša Arežina c032fd3a90 Refactor configuration restoration to use restore_backup
Removed manual configuration restoration and replaced it with a backup restore function.
2026-07-04 01:07:03 +02:00
4 changed files with 8 additions and 20 deletions
-8
View File
@@ -489,14 +489,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details> </details>
## 2026-07-04
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix(endurain): update frontend dist path after upstream restructure [@joaovitoriasilva](https://github.com/joaovitoriasilva) ([#15590](https://github.com/community-scripts/ProxmoxVE/pull/15590))
## 2026-07-03 ## 2026-07-03
### 🚀 Updated Scripts ### 🚀 Updated Scripts
+3 -3
View File
@@ -36,7 +36,7 @@ function update_script() {
msg_info "Creating Backup" msg_info "Creating Backup"
cp /opt/endurain/.env /opt/endurain.env cp /opt/endurain/.env /opt/endurain.env
cp /opt/endurain/frontend/dist/env.js /opt/endurain.env.js cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
msg_ok "Created Backup" msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain" CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
@@ -52,10 +52,10 @@ function update_script() {
msg_ok "Prepared Update" msg_ok "Prepared Update"
msg_info "Updating Frontend" msg_info "Updating Frontend"
cd /opt/endurain/frontend cd /opt/endurain/frontend/app
$STD npm ci $STD npm ci
$STD npm run build $STD npm run build
cp /opt/endurain.env.js /opt/endurain/frontend/dist/env.js cp /opt/endurain.env.js /opt/endurain/frontend/app/dist/env.js
rm /opt/endurain.env.js rm /opt/endurain.env.js
msg_ok "Updated Frontend" msg_ok "Updated Frontend"
+2 -6
View File
@@ -41,11 +41,8 @@ function update_script() {
create_backup /opt/twenty/.env \ create_backup /opt/twenty/.env \
/opt/twenty/packages/twenty-server/.local-storage /opt/twenty/packages/twenty-server/.local-storage
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "twenty" "twentyhq/twenty" "tarball" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "twenty" "twentyhq/twenty" "tarball"
restore_backup
msg_info "Restoring Configuration"
cp /opt/twenty.env.bak /opt/twenty/.env
msg_ok "Restored Configuration"
msg_info "Building Application" msg_info "Building Application"
cd /opt/twenty cd /opt/twenty
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
@@ -66,7 +63,6 @@ function update_script() {
$STD npx -y typeorm migration:run -d dist/database/typeorm/core/core.datasource $STD npx -y typeorm migration:run -d dist/database/typeorm/core/core.datasource
msg_ok "Ran Database Migrations" msg_ok "Ran Database Migrations"
restore_backup
msg_info "Starting Services" msg_info "Starting Services"
systemctl start twenty-server twenty-worker systemctl start twenty-server twenty-worker
+3 -3
View File
@@ -55,7 +55,7 @@ DB_HOST=localhost
DATABASE_URL=postgresql+psycopg://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME} DATABASE_URL=postgresql+psycopg://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
BACKEND_DIR="/opt/endurain/backend/app" BACKEND_DIR="/opt/endurain/backend/app"
FRONTEND_DIR="/opt/endurain/frontend/dist" FRONTEND_DIR="/opt/endurain/frontend/app/dist"
DATA_DIR="/opt/endurain_data/data" DATA_DIR="/opt/endurain_data/data"
LOGS_DIR="/opt/endurain_data/logs" LOGS_DIR="/opt/endurain_data/logs"
@@ -69,10 +69,10 @@ EOF
msg_ok "Setup Endurain" msg_ok "Setup Endurain"
msg_info "Building Frontend" msg_info "Building Frontend"
cd /opt/endurain/frontend cd /opt/endurain/frontend/app
$STD npm ci --prefer-offline $STD npm ci --prefer-offline
$STD npm run build $STD npm run build
cat <<EOF >/opt/endurain/frontend/dist/env.js cat <<EOF >/opt/endurain/frontend/app/dist/env.js
window.env = { window.env = {
ENDURAIN_HOST: "${ENDURAIN_HOST}" ENDURAIN_HOST: "${ENDURAIN_HOST}"
} }