mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Fix: add ZipArchive guard to export-files.php, add composer install step + composer.json sync to deploy recipe
This commit is contained in:
3
TODO.md
3
TODO.md
@@ -163,6 +163,9 @@
|
||||
|
||||
# Current tasks
|
||||
|
||||
- [x] Add ZipArchive guard to legacy export-files.php
|
||||
- [x] Add composer install --no-dev step to deploy recipe + composer.json/composer.lock rsync (vendor/ excluded from rsync, de-librairisation requires Composer deps on server; composer.json lives in repo root, deploy only syncs app/)
|
||||
|
||||
- [x] Cleanup modal: list files that will be removed (not just counts)
|
||||
- [x] Storage restructure: documents/ → {objet}/ (tfe/theses/frart)
|
||||
- [x] Migration script: move files + update DB paths
|
||||
|
||||
@@ -17,6 +17,12 @@ require_once APP_ROOT . '/src/Controllers/ExportController.php';
|
||||
require_once APP_ROOT . '/src/AdminLogger.php';
|
||||
require_once APP_ROOT . '/src/ErrorHandler.php';
|
||||
|
||||
if (!class_exists('ZipArchive')) {
|
||||
http_response_code(500);
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
exit('Module PHP <code>zip</code> non installé sur le serveur. Contactez l\'administrateur système (<code>apt install php8.4-zip</code>).');
|
||||
}
|
||||
|
||||
try {
|
||||
$controller = ExportController::create();
|
||||
|
||||
|
||||
3
justfile
3
justfile
@@ -75,6 +75,9 @@ deploy:
|
||||
ssh -t xamxam "sudo bash /tmp/deploy-server.sh"
|
||||
ssh xamxam "rm -f /tmp/deploy-server.sh /tmp/xamxam.conf"
|
||||
ssh xamxam "mkdir -p /var/www/xamxam/var/{cache,logs,tmp}"
|
||||
# Install/update Composer dependencies (vendor/ excluded from rsync above)
|
||||
rsync -v composer.json composer.lock xamxam:/var/www/xamxam/
|
||||
ssh xamxam "cd /var/www/xamxam && composer install --no-dev --no-interaction --optimize-autoloader"
|
||||
# Run pending migrations (creates DB from schema if missing, idempotent)
|
||||
rsync -v scripts/migrate.sh xamxam:/tmp/migrate.sh
|
||||
ssh xamxam "cd /var/www/xamxam && REPO_ROOT=/var/www/xamxam bash /tmp/migrate.sh"
|
||||
|
||||
Reference in New Issue
Block a user