Temporarily 'suspending' a Symfony app
I need to perform an upgrade/enhancement on a Symfony (1.3.8) powered website. the site will be offlin开发者_运维技巧e for a few days atleast. Does anyone know how I can setup an "temporaily offline" page, using the Symfony framework?
Following is a quote from A Gentle Introduction to symfony, chapter 16:
You can temporarily disable your application - for instance, when you need to upgrade a library or a large amount of data.
php symfony project:disable APPLICATION_NAME ENVIRONMENT_NAME
By default, a disabled application displays the sfConfig::get('sf_symfony_lib_dir')/exception/data/unavailable.php
page, but if you create your own unavailable.php file in your project's config/ directory, symfony will use it instead.
The project:enable task reenables the application and clears the cache.
php symfony project:enable APPLICATION_NAME ENVIRONMENT_NAME
project:disable currently has no effect if the check_lock parameter is not set to true in settings.yml.
精彩评论