Instanz anlegen). The token is displayed exactly once. define("MANAGE_INSTANCE", "psa-prod"); define("MANAGE_TOKEN", ""); // Seconds per HTTP request. Package downloads and backup uploads use the long // timeout, manifest and heartbeat the short one. define("MANAGE_HTTP_TIMEOUT", 15); define("MANAGE_HTTP_TIMEOUT_LONG", 300); // --------------------------------------------------------------------------- // Application layout // --------------------------------------------------------------------------- // Root of the host application. Defaults to the parent of this folder, which is // correct when manage-client/ sits directly in the application root. define("MANAGE_APP_ROOT", dirname(__DIR__)); // Where the installed version is stored. // - PHP file with a constant: set both values // - plain text file containing only "v1.2.3": set MANAGE_VERSION_CONSTANT null define("MANAGE_VERSION_FILE", MANAGE_APP_ROOT . "/includes/version.php"); define("MANAGE_VERSION_CONSTANT", "APP_VERSION"); // Working directories. Must be writable by PHP and should not be web-readable. define("MANAGE_WORK_DIR", MANAGE_APP_ROOT . "/data/manage/work/"); define("MANAGE_UPDATE_BACKUP_DIR", MANAGE_APP_ROOT . "/data/manage/updates/"); define("MANAGE_BACKUP_DIR", MANAGE_APP_ROOT . "/data/manage/backups/"); define("MANAGE_LOG_FILE", MANAGE_APP_ROOT . "/data/manage/manage-client.log"); // --------------------------------------------------------------------------- // Update // --------------------------------------------------------------------------- // Paths the updater must never overwrite, relative to MANAGE_APP_ROOT. // A trailing slash marks a directory; everything below it is protected. define("MANAGE_UPDATE_PROTECTED_PATHS", [ "config.php", "data/", ".git/", "manage-client/config.php", ]); // A package must contain at least one of these paths, otherwise it is rejected // before anything is copied. Guards against deploying an unrelated ZIP. define("MANAGE_UPDATE_SANITY_PATHS", ["index.php"]); // Optional callback executed after a successful deployment. // See docs/07_POST_UPDATE_HOOKS.md. define("MANAGE_UPDATE_POST_HOOK", null); // define("MANAGE_UPDATE_POST_HOOK", [ // "file" => MANAGE_APP_ROOT . "/includes/after-update.php", // "callback" => "myProjectAfterUpdate", // ]); // Migrations shipped inside the release package. Set to null to disable. define("MANAGE_MIGRATIONS_DIR", MANAGE_APP_ROOT . "/migrations"); define("MANAGE_MIGRATIONS_STATE", MANAGE_APP_ROOT . "/data/manage/migrations.json"); // --------------------------------------------------------------------------- // Backup // --------------------------------------------------------------------------- // What goes into the archive. Paths are relative to MANAGE_APP_ROOT. // "glob" => shell glob, non-recursive // "dir" => directory, recursive // "file" => single file // "as" => path prefix inside the ZIP define("MANAGE_BACKUP_SOURCES", [ ["as" => "data", "glob" => "data/*.json"], ["as" => "data/uploads", "dir" => "data/uploads"], ]); // Optional MySQL/MariaDB dump. null disables it entirely. define("MANAGE_BACKUP_DATABASE", null); // define("MANAGE_BACKUP_DATABASE", [ // "dsn" => "mysql:host=localhost;dbname=myproject;charset=utf8mb4", // "user" => "myproject", // "password" => "...", // // Optional: only dump the structure of these tables, not their rows. // "skip_data_tables" => ["sessions", "cache"], // ]); // Local archives kept on the instance. Minimum 1. define("MANAGE_BACKUP_LOCAL_RETENTION", 4); // Interval for manageBackupCreateAutomaticIfDue(), in seconds. 0 disables it. // Default is weekly. Irrelevant when a cron job runs the CLI instead. define("MANAGE_BACKUP_AUTO_INTERVAL_SECONDS", 604800); // Compress entries in the ZIP. Deflate needs zlib (bundled with PHP by default) // and matters mostly for SQL dumps; false stores everything uncompressed. define("MANAGE_BACKUP_COMPRESS", true); // Upload every new backup to the manage server. Set false for local-only backups. define("MANAGE_BACKUP_UPLOAD", true); // Additional targets besides the manage server: s3, sftp, custom. // See docs/05_BACKUP_SOURCES.md. define("MANAGE_BACKUP_REMOTE_TARGETS", []);