NCAR / ncharts

EOL data visualization application
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

git-based deployments #2

Open erikj opened 8 years ago

erikj commented 8 years ago

implement git-based deployment workflow for ncharts@datavis

erikj commented 8 years ago
  • .git/hooks/post-receive
    • ...
    • restart apache or touch .wsgi file ? TBD
$ touch datavis/wsgi.py

http://modwsgi.readthedocs.io/en/develop/user-guides/reloading-source-code.html?highlight=touch#reloading-in-daemon-mode

In this way, restarting of a WSGI application when a change has been made to the code is a simple matter of touching the script file if daemon mode is being used. Any daemon processes will then automatically restart without the need to restart the whole of Apache.

So, if you are using Django in daemon mode and needed to change your ‘settings.py’ file, once you have made the required change, also touch the script file containing the WSGI application entry point. Having done that, on the next request the process will be restarted and your Django application reloaded.