update docs

This commit is contained in:
2026-11-27 17:23:32 +01:00
parent 200aee2106
commit f347ce126a
5 changed files with 165 additions and 89 deletions
+14 -61
View File
@@ -1,70 +1,23 @@
# Getting Started
This guide will help you get Plugi up and running on your local machine or server.
This guide introduces Plugi and links to the complete [installation guide](installation.md), which covers fresh manual deployments and local Docker development.
## Requirements
- **PHP 8.2** or higher
- **MySQL 8.0** or higher
- **Apache** or **Nginx** web server
- **PDO MySQL** extension enabled
- **PHP 8.4** with the **PDO MySQL** extension
- **MySQL 8.0** or a compatible MySQL server
- **Apache** with the required routing support for a manual deployment
- **Docker Compose** for the optional local development stack
## Installation
## Setup summary
### Option 1: Manual Installation
1. Copy `.env.dist` to `.env` and `config.dist.php` to `config.php`.
2. Set the database connection, public base URL, and admin credentials in `.env`.
3. Create an empty database and a dedicated database user, then make `uploads/` writable by the web-server user.
4. Open the site and sign in at `/admin/auth`.
5. Use the Website Manager database update flow to create or update the schema.
1. **Download Plugi** and upload it to the webroot directory of your website.
2. **Create the `.env` file** by copying `.env.example` (if available) or creating one with the following variables:
```ini
DB_HOST=mysql
DB_NAME=plugi
DB_USER=plugi
DB_PASSWORD=plugi
STAGE=development
```
Adjust the database credentials to match your MySQL server.
3. **Create the config file** by copying `config.dist.php` to `config.php`:
```bash
cp config.dist.php config.php
```
4. **Edit `config.php`** and update the settings as needed. At a minimum, change the default login credentials in the `auth` section.
5. **Set up the database**. On first access, Plugi will create the required tables automatically. If the database schema changes in a future version, the admin panel will prompt you to update it.
6. **Access the admin panel** by navigating to `/admin` on your website and logging in with the credentials you set in `config.php` (defaults are `admin` / `admin`).
### Option 2: Docker
The quickest way to get started is with Docker Compose:
1. **Clone or download** the Plugi repository.
2. **Create the `.env` file** with your environment variables (see above).
3. **Create `config.php`** from `config.dist.php`:
```bash
cp config.dist.php config.php
```
4. **Start the services**:
```bash
docker-compose up -d
```
This will start three services:
- **Web** (PHP 8.2 + Apache) on port `63000`
- **MySQL 8.0** database
- **Adminer** (database management) on port `63001`
5. **Open your browser** and navigate to `http://localhost:63000/admin` to access the admin panel.
See the [installation guide](installation.md) for exact environment variable names, database provisioning, the schema update process, production security, and Docker-specific steps. The supplied Compose stack is for local development only.
## First Steps
@@ -105,10 +58,10 @@ project-root/
Before deploying to production:
1. Set `STAGE=production` in your `.env` file to disable error reporting.
2. Change the default admin credentials in `config.php`.
2. Set a unique admin username and a `PASSWORD_HASH` in `.env`; do not use the legacy plaintext `PASSWORD` setting in production.
3. Enable caching in `config.php` (`cache.enabled => true`) for better performance.
4. Ensure the `uploads/` directory is writable but not executable.
5. Consider using `.htaccess` (Apache) or Nginx config to serve `/uploads` directly, bypassing PHP for faster file delivery.
5. Configure the web server to serve uploaded files safely; do not allow uploaded PHP files to execute.
## Next Steps