mmi/mmi-cms-standard
Composer 安装命令:
composer create-project mmi/mmi-cms-standard
包简介
MMi Framework project with CMS - standard edition
README 文档
README
A standard project skeleton for building applications on top of MMi CMS — a PHP content management system built on the MMi Framework.
Requirements
- PHP 8.5+
- Composer
- SQLite (default) or a supported PDO-compatible database
Getting started
Option 1: PHP built-in server (quickest)
cp .env.dist .env # if applicable — edit values as needed
make up
This will:
- Run
composer install - Set write permissions on
var/ - Create
var/db.sqlite - Run database migrations (
bin/mmi Mmi:DbDeploy) - Start the PHP CLI server at http://127.0.0.1:8080
Option 2: Docker + Apache
make docker-up
This builds the image, starts the container (Apache on port 8080), installs dependencies, sets up the database and drops you into a bash shell inside the container. The project root is volume-mounted at /var/www/html.
Stop and remove the container:
make docker-down
Configuration
All runtime configuration is in .env. Key variables:
| Variable | Default | Description |
|---|---|---|
APP_DEBUG_ENABLED |
1 |
Enable debug mode |
APP_BASE_URL |
(empty) | Base URL override |
APP_VIEW_CDN |
(empty) | CDN prefix for assets |
CMS_AUTH_SALT |
— | Set this to a random secret |
CMS_LANG_DEFAULT |
en |
Default language |
CMS_THUMB_QUALITY |
80 |
JPEG thumbnail quality |
DB_DRIVER |
sqlite |
Database driver |
DB_HOST |
./var/db.sqlite |
DB host or path (SQLite) |
CACHE_SYSTEM_ENABLED |
0 |
System cache on/off |
CACHE_PUBLIC_ENABLED |
0 |
Public cache on/off |
For Docker, change DB_HOST to /app/var/db.sqlite (see the comment in .env).
Project structure
src/App/
AppRouterConfig.php # Extend to add custom routes
AppSkinsetConfig.php # Register skin(set) configs here
di.app.php # DI container bindings
etc/apache2/ # Apache vhost config (used by Docker)
var/ # Runtime data — writable by the web server
cache/
data/
db.sqlite
log/
session/
bin/mmi # CLI entry point
CLI
bin/mmi <Command>:<action>
Useful commands:
bin/mmi Mmi:DbDeploy # Run pending database migrations bin/mmi Mmi:Cache:Clean # Clear all caches
Extending the application
Adding routes
Extend AppRouterConfig in src/App/AppRouterConfig.php:
class AppRouterConfig extends CmsRouterConfig { public function __construct() { parent::__construct(); $this->addRoute(new \Mmi\Mvc\RouterConfig\Route(...)); } }
Adding skins/templates
Register a skin in src/App/AppSkinsetConfig.php:
public function __construct() { $this->addSkin(new MySkinConfig()); }
Dependency injection
Add or override services in src/App/di.app.php:
return [ RouterConfig::class => create(AppRouterConfig::class), // add your own bindings here ];
License
MIT
mmi/mmi-cms-standard 适用场景与选型建议
mmi/mmi-cms-standard 是一款 基于 Makefile 开发的 Composer 扩展包,目前已累计 998 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 09 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mmi/mmi-cms-standard 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mmi/mmi-cms-standard 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 998
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-21