diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 53b0d66..0201526 100644 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -89,6 +89,15 @@ ensure_ui_permissions() { find "$ui_root" -type f -exec chmod 644 {} \; } +clean_ui_build_artifacts() { + cd "$APP_DIR/ui" + rm -rf dist .quasar node_modules/.cache || true +} + +purge_nginx_ui_cache() { + rm -rf /var/cache/nginx/* || true +} + ensure_ui_readable_by_nginx() { local ui_index="$APP_DIR/ui/dist/spa/index.html" @@ -174,6 +183,7 @@ run_deploy() { log_step "BUILD UI" cd "$APP_DIR/ui" + clean_ui_build_artifacts npm ci --no-audit --no-fund --include=optional npm i -D --no-audit --no-fund sass-embedded@1.93.2 npm run build @@ -194,6 +204,9 @@ run_deploy() { log_step "RESTART SERVICES" restart_services + log_step "PURGE NGINX CACHE" + purge_nginx_ui_cache + echo "[DEPLOY FINISHED] $(date '+%F %T')" } diff --git a/scripts/publish.sh b/scripts/publish.sh index e143339..e4bcc55 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -30,7 +30,7 @@ echo "Transferring additional files" #rsync -azP ${PRJ_ROOT}/db/sqls root@${DEST_IP}:/opt/${APP} --delete #rsync -azP ${SVC_ROOT}/fonts/ root@${DEST_IP}:/opt/${APP}/fonts --delete #rsync -azP ${PRJ_ROOT}/db/migration/base root@${DEST_IP}:/opt/${APP}/migrate --delete -rsync -azP ${UI_ROOT}/dist/spa/ root@${DEST_IP}:/opt/${APP}/ui --delete +rsync -azP ${UI_ROOT}/dist/spa/ root@${DEST_IP}:/opt/${APP}/ui/dist/spa/ --delete #echo "Migrating database" #ssh root@${DEST_IP} "/opt/migrater -folder /opt/${APP}/migrate/base -db ${APP} -host 10.0.0.2 -tracker base -migrate-table symigrate -password tesnos.+ed" diff --git a/ui/src/router/routes.js b/ui/src/router/routes.js index 6c4dbbd..8e197cf 100644 --- a/ui/src/router/routes.js +++ b/ui/src/router/routes.js @@ -149,7 +149,7 @@ const routes = [ { path: 'aged-customer-balance-list', name: 'aged-customer-balance-list', - component: () => import('pages/AccountAgingStatement.vue'), + redirect: { name: 'account-aging-statement' }, meta: { permission: 'finance:view' } },