Refactor configuration restoration to use restore_backup

Removed manual configuration restoration and replaced it with a backup restore function.
This commit is contained in:
Slaviša Arežina
2026-07-04 01:07:03 +02:00
committed by GitHub
parent 9406a1ca98
commit c032fd3a90
+1 -5
View File
@@ -41,10 +41,7 @@ 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
@@ -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