settings updates, fixed

This commit is contained in:
Mark Gregory
2026-08-25 22:49:46 +01:00
parent db5efbc834
commit a49b22cf83
3 changed files with 33 additions and 19 deletions
+32 -4
View File
@@ -4,7 +4,6 @@ namespace Deployer;
require 'recipe/laravel.php';
// System Config
set('writable_use_sudo', true);
set('clear_use_sudo', true);
set('cleanup_use_sudo', true);
@@ -17,7 +16,6 @@ add('shared_files', ['.env']);
add('shared_dirs', ['storage']);
add('writable_dirs', ['storage', 'bootstrap/cache']);
// Host Definitions
host('main')
->set('hostname', 'helpdesk.absdev.net')
->set('remote_user', 'mag')
@@ -30,9 +28,39 @@ host('develop')
->set('branch', 'develop')
->set('deploy_path', '/var/www/helpdesk_dev');
/*
* Install the root npm tree, then every module that owns its own lock file,
* then run ONE root Vite build. Because Vite is compiling a module source file,
* normal Node resolution finds that module's own node_modules first.
*/
task('build', function (): void {
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm ci --no-audit --no-fund');
run('export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && nvm use {{node_version}} && cd {{release_path}} && npm run build');
$node = 'export NVM_DIR="$HOME/.nvm"'
.' && [ -s "$NVM_DIR/nvm.sh" ]'
.' && . "$NVM_DIR/nvm.sh"'
.' && nvm use {{node_version}}';
run(
$node
.' && cd {{release_path}}'
.' && npm ci --no-audit --no-fund'
);
run(
$node
.' && cd {{release_path}}'
.' && for lock in Modules/*/package-lock.json; do'
.' [ -f "$lock" ] || continue;'
.' module_dir="$(dirname "$lock")";'
.' echo "[Modules] npm ci: $module_dir";'
.' (cd "$module_dir" && npm ci --no-audit --no-fund);'
.' done'
);
run(
$node
.' && cd {{release_path}}'
.' && npm run build'
);
});
task('queue:restart', function (): void {