There is no "manage.py server" management command. There is only "manage.py runserver", which you probably know already, and which is meant only for development, not for production. For development, "manage.py runserver" works wonders, and stopping it with Ctrl+C is all you want.
mod_wsgi is started by the Apache web server. For gunicorn and uwsgi, you need to start them using systemd or supervisor or a similar daemon manager, which will take care of its pids and everything else you need.
Antonis Christofides http://djangodeployment.com
On 2016-11-26 09:06, anatoly techtonik wrote:
Is there a plugin that allows me to start and stop django server from command line?--
Suppose I have multiple sites running at the same time, so going `ps aux` to manually inspect which site to kill is a time stealer. I expect that `manage.py server stop` stop all servers that were run for the current development project.
manage.py server stop -- stop dev server(s) run for current project
Also, `server start` should store pid somewhere, so that it could be checked and killed. What is the best place to store that?
manage.py server start -- start django server for current project in foreground
options:
-b, --background -- run server in background
--autoport -- select port automatically
--dump -- dump server parameters (port, pid, etc) in JSON format (disables other stdout output)
$ manage server start --dump
{
'addr: 127.0.0.1,
'port': 8080,
'pid': 13224,
'pidfile': '/tmp/django-project1`
}
Automatic port selection is needed if you want to preview another branch with a temporary copy of current project. Maybe there is a plugin for branch testing/preview too that can help me?
Thanks.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0d442f3c-4b27-496b-aa6b-12acb18cad88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment