# Installation ## Option 1 — Docker (Recommended) ```bash docker pull git.mchus.pro/mchus/turborfq:latest docker run -d \ --name turborfq \ -p 8080:8080 \ -e DB_HOST=your-mariadb-host \ -e DB_PORT=3306 \ git.mchus.pro/mchus/turborfq:latest ``` Open http://localhost:8080 in your browser. ### Environment Variables | Variable | Default | Description | |----------|---------|-------------| | `DB_HOST` | `localhost` | MariaDB server address | | `DB_PORT` | `3306` | MariaDB server port | | `DB_CHARSET` | `utf8mb4` | Connection charset | > When running in Docker, use the host machine's IP or `host.docker.internal` instead of `localhost` for `DB_HOST`. --- ## Option 2 — Manual ### Prerequisites - PHP 8.1+ with extensions: `pdo_mysql`, `mbstring`, `xml` - Composer (global installation recommended) - Access to a MariaDB server Install PHP and tools (Debian/Ubuntu): ```bash sudo apt update sudo apt install php php-cli php-mbstring php-xml php-mysql unzip git ``` Install Composer globally: ```bash php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php composer-setup.php --install-dir=/usr/local/bin --filename=composer php -r "unlink('composer-setup.php');" ``` ### Steps 1. Clone the repository: ```bash git clone https://git.mchus.pro/mchus/turborfq.git turborfq cd turborfq ``` 2. Install PHP dependencies: ```bash composer install ``` 3. Start the development server: ```bash php -S localhost:8080 -t public ``` Open http://localhost:8080 in your browser. > The PHP built-in server is for **development only**. For production use Nginx or Apache with `public/` as document root and `index.php` as the front controller. --- ## Troubleshooting | Symptom | Likely cause | Fix | |---------|-------------|-----| | Blank page / PHP errors | `display_errors` off | Enable in `php.ini` or check `docker logs turborfq` | | 401 "Not authenticated" | Session cookie missing | Ensure browser accepts cookies; re-login | | Cannot connect to MariaDB | Wrong host/port/credentials | Verify `DB_HOST`, `DB_PORT`; test with `mysql` client | | CSV import errors | Malformed CSV or type mismatch | Check column types; review per-row errors in response |