# OZI-RIS v6 web installation

## Server requirements

- PHP 8.2 or newer with PDO MySQL, OpenSSL, Mbstring, Fileinfo, XML, Ctype, JSON, and Tokenizer
- MariaDB 10.6+ or MySQL 8+
- A new, empty database and a database user with privileges for that database
- The web document root pointed to the project's `public` directory
- Write access for the web-server user to `.env`, `storage`, and `bootstrap/cache`
- HTTPS strongly recommended

## Install

1. Upload and extract the Oziris RIS package outside the public web directory.
2. Configure the domain or subdomain document root to the extracted `public` directory.
3. Open `https://your-domain.example/install`.
4. Confirm every server-preflight check passes.
5. Enter the production URL, facility name, empty database credentials, and first administrator.
6. Optionally configure SMTP for password reset and notifications.
7. Keep the browser open while the schema, access roles, and clinical catalogue are created.
8. After completion, sign in at `https://your-domain.example/login`.

The installer generates `.env`, migrates the database, installs roles and permissions,
imports the production clinical catalogue, creates the administrator, and writes
`storage/app/installed.lock`. Once that lock exists, the installer cannot be run again.
For patient-safety and data-protection reasons, the selected database must contain no tables.

The catalogue includes general radiography, CT, MRI, ultrasound, nuclear medicine,
mammography, DXA, fluoroscopy, angiography, and mobile X-ray, with their anatomical
regions and more than 350 linked procedures. Site-specific DICOM AE titles are intentionally
left blank and must be configured by an administrator after installation.

On the first request, `public/index.php` creates `.env` from `.env.example` when needed and
generates a temporary boot key. The completed installer always replaces it with a fresh
production application key.

## Required background processes

Run Laravel's scheduler every minute:

```cron
* * * * * cd /path/to/oziris && php artisan schedule:run >/dev/null 2>&1
```

Keep a queue worker running under Supervisor, systemd, or the hosting control panel:

```bash
php artisan queue:work --sleep=3 --tries=3 --timeout=120
```

Never expose the project root, `.env`, `storage`, or `vendor` directly through the web server.

### cPanel main-domain fallback

If cPanel does not permit changing the main domain document root, extract the package directly
into `public_html` and retain the package's root `.htaccess`. It internally routes traffic through
`public/` and blocks web access to private Laravel directories. Changing the document root to
`public_html/public` remains the preferred configuration.
