2014年3月25日 星期二

mod_wsgi automatic reload on source code change

Adding the WSGIScriptReloading directive meant that any time I made changes to my application files, I could simply $  touch flaskTest.wsgi and the app would restart with changes applied.
 
# vi /etc/apache2/sites-enabled/000-default.conf 
<VirtualHost *:80>
    ServerName flasktest.subdimension.co.uk

    WSGIDaemonProcess flaskTest user=flask group=www-data threads=5 home=/<redacted>/flaskTest
    WSGIScriptAlias / /<redacted>/flaskTest/flaskTest.wsgi

    <Directory /<redacted>/flaskTest>
        WSGIProcessGroup flaskTest
        WSGIApplicationGroup %{GLOBAL}
        WSGIScriptReloading On
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

$ touch /<redacted>/flaskTest/flaskTest.wsgi




References :
Deploying Flask to Apache » subdimension

沒有留言:

張貼留言