๐ About BPerme Project
BPerme is a modern PHP development environment built with Docker, designed for efficient web application development.
๐ฏ Project Goals
- โ Fast development environment setup
- โ Production-like configuration
- โ Modern development practices
- โ Easy database management
- โ Secure project structure
๐ ๏ธ Technology Stack
- ๐ PHP 7.4.33
- ๐๏ธ MariaDB 10.6
- ๐ Apache + mod_rewrite
- ๐ณ Docker & Docker Compose
- ๐ฑ Responsive CSS
๐ Project Structure
bperme/
โโโ ๐ app/ # Main application
โ โโโ config/ # Configuration files
โ โ โโโ database.php # Database settings
โ โโโ public/ # Web root (DocumentRoot)
โ โ โโโ index.php # Entry point with routing
โ โ โโโ test.php # Environment testing
โ โ โโโ css/styles.css # Stylesheets
โ โ โโโ js/app.js # JavaScript
โ โโโ src/ # Source code
โ โ โโโ controllers/ # MVC Controllers
โ โ โโโ models/ # Data models
โ โ โโโ services/ # Business logic
โ โโโ templates/ # View templates
โโโ ๐ docker/ # Docker configuration
โ โโโ apache/ # Apache config
โ โโโ mysql/init/ # Database initialization
โโโ docker-compose.yml # Services orchestration
โโโ Dockerfile # PHP container build
โโโ README.md # Documentation
โโโ ๐ app/ # Main application
โ โโโ config/ # Configuration files
โ โ โโโ database.php # Database settings
โ โโโ public/ # Web root (DocumentRoot)
โ โ โโโ index.php # Entry point with routing
โ โ โโโ test.php # Environment testing
โ โ โโโ css/styles.css # Stylesheets
โ โ โโโ js/app.js # JavaScript
โ โโโ src/ # Source code
โ โ โโโ controllers/ # MVC Controllers
โ โ โโโ models/ # Data models
โ โ โโโ services/ # Business logic
โ โโโ templates/ # View templates
โโโ ๐ docker/ # Docker configuration
โ โโโ apache/ # Apache config
โ โโโ mysql/init/ # Database initialization
โโโ docker-compose.yml # Services orchestration
โโโ Dockerfile # PHP container build
โโโ README.md # Documentation
๐ง PHP Extensions
โข mysqli
โข mysqlnd
โข pdo_mysql
โข gd
โข zip
โข curl
โข mbstring
โข intl
๐ Available Services
- ๐ฑ Web App: :8080
- ๐๏ธ phpMyAdmin: :8081
- ๐ MariaDB: :3306
- ๐ก API Endpoints: /api/*
๐ Security Features
- โ Source code outside web root
- โ Secure file permissions
- โ Environment isolation
- โ Database credentials in env
๐ Quick Commands
๐ณ Docker Management
# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs -f
๐ Debugging
# Container status
docker-compose ps
# PHP container shell
docker exec -it bperme-php bash
# Database connection
docker exec -it bperme-db mysql
docker-compose ps
# PHP container shell
docker exec -it bperme-php bash
# Database connection
docker exec -it bperme-db mysql