forked from vernondcole/formhub
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vernondcole
committed
May 16, 2014
1 parent
2346b55
commit 5f4ba55
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
### NGINX and uWSGI | ||
|
||
follow the guidelines in https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/uwsgi/ | ||
and https://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html | ||
|
||
alter the settings in formhub/preset/production.py to the actual location of your production MEDIA and STATIC roots | ||
alter formhub/nginx.conf to match | ||
sudo ln -s /opt/formhub/formhub/nginx.conf /etc/nginx/sites-enabled/ | ||
|
||
uWSGI django.ini file | ||
sudo ln -s /opt/formhub/formhub/wsgi.ini /etc/uwsgi/vassals/ | ||
|
||
test using: | ||
sudo uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data | ||
|
||
create the file /etc/init/uwsgi.conf containing: | ||
# Emperor uWSGI script | ||
|
||
description "uWSGI Emperor" | ||
start on runlevel [2345] | ||
stop on runlevel [06] | ||
|
||
exec uwsgi --master --die-on-term --emperor /etc/uwsgi/vassals --uid www-data --gid www-data | ||
start it using | ||
sudo start uwsgi | ||
|
||
install your static files into the directory from which they will be served in production | ||
./manage.py collectstatic | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters