开发者

Temporarily 'suspending' a Symfony app

开发者 https://www.devze.com 2023-02-14 14:49 出处:网络
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\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消