Last active
August 29, 2015 14:00
-
-
Save dimitrov/11370215 to your computer and use it in GitHub Desktop.
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
import os | |
from django.dispatch import receiver | |
from rosetta.signals import post_save | |
@receiver(post_save) | |
def restart_server(sender, **kwargs): | |
os.system('initctl reload <myapp>') |
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
description "myapp" | |
start on (filesystem) | |
stop on runlevel [016] | |
respawn | |
console log | |
setuid nobody | |
setgid nogroup | |
chdir /var/www/myapp | |
exec /root/.virtualenvs/myapp/bin/gunicorn_django -c gunicorn.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment