lch / maintenance-bundle
Symfony LchMaintenanceBundle
0.1.2
2020-11-20 16:22 UTC
Requires
- php: ^7.2
- symfony/console: ^4.2
- symfony/filesystem: ^4.2
- symfony/framework-bundle: ^4.2
Requires (Dev)
- symfony/phpunit-bridge: ^4.3
README
提供辅助工具以将Web应用程序设置为维护模式。当使用自动化部署流程时,这非常有用,可以确保在部署过程中网站无法正确访问。
此捆绑包提供用于维护启动屏幕的平面HTML文件。这是为了避免在维护期间生成缓存。
安装
composer require lch/maintenance-bundle
使用
使用命令切换维护模式
php bin/console lch:maintenance:mode 1
启用维护(在public/
中创建.maintenance
文件)php bin/console lch:maintenance:mode 0
禁用维护(从public/
中删除.maintenance
文件)
当维护模式开启时,将提供静态启动HTML页面,并带有503 HTTP代码。
待办事项
- 使HTML文件可配置
- 添加选项
- 增强异常处理
- ...