| 18 |
- [Build from Source](#build-from-source) |
- [Build from Source](#build-from-source) |
| 19 |
- [Using Pre-built Images](#using-pre-built-images) |
- [Using Pre-built Images](#using-pre-built-images) |
| 20 |
- [Configuration for Docker](#configuration-for-docker) |
- [Configuration for Docker](#configuration-for-docker) |
|
- [Docker Compose Services](#docker-compose-services) |
|
|
- [Common Docker Commands](#common-docker-commands) |
|
| 21 |
- [Persistent Data](#persistent-data) |
- [Persistent Data](#persistent-data) |
| 22 |
- [Copyright Information](#copyright-information) |
- [Copyright Information](#copyright-information) |
| 23 |
- [License](#license) |
- [License](#license) |
| 46 |
|
|
| 47 |
### 1. Prerequisites and Required Libraries |
### 1. Prerequisites and Required Libraries |
| 48 |
- **PHP 8.2+** and **MySQL 8.4+** installed |
- **PHP 8.2+** and **MySQL 8.4+** installed |
| 49 |
- Install Composer using your package manager (e.g., `apt`, `yum`, or from [getcomposer.org](https://getcomposer.org/)) |
- Install Composer using your package manager (e.g., `apt`, `yum`) |
| 50 |
- Run the following command in the project root directory: |
- Run the following command in the project root directory: |
| 51 |
```bash |
```bash |
| 52 |
composer install --prefer-dist --no-scripts --no-progress |
composer install --prefer-dist --no-scripts --no-progress |
| 132 |
- Edit the configuration files as needed |
- Edit the configuration files as needed |
| 133 |
- Restart the container: `docker compose restart` |
- Restart the container: `docker compose restart` |
| 134 |
|
|
|
### Docker Compose Services |
|
|
- **web**: Apache HTTP Server with PHP 8.2 |
|
|
- **db**: MySQL 8.4 database |
|
|
- **phpmyadmin**: Database management interface (optional, available at `http://localhost:8081`) |
|
|
|
|
|
### Common Docker Commands |
|
|
```bash |
|
|
# View logs |
|
|
docker compose logs -f |
|
|
|
|
|
# Stop containers |
|
|
docker compose down |
|
|
|
|
|
# Rebuild and restart |
|
|
docker compose up --build -d |
|
|
|
|
|
# Access container shell |
|
|
docker compose exec web bash |
|
|
``` |
|
|
|
|
| 135 |
### Persistent Data |
### Persistent Data |
| 136 |
- Database data is stored in a Docker volume (`leafok_bbs_db_data`) |
- Database data is stored in a Docker volume (`leafok_bbs_db_data`) |
| 137 |
- Uploaded files and cache are stored in mounted host directories |
- Uploaded files and cache are stored in mounted host directories |