Defining new project as a service at nignx

36 views
Skip to first unread message

Muhammed TÜFEKYAPAN

unread,
Oct 14, 2013, 1:17:05 PM10/14/13
to django...@googlegroups.com
Hello everybody,


I use digitalocean as a server. I upload my django project files on my server and start to setup. Made postgresql settings etc but I can't define my new project as a new service on nginx. How can I define my new projest as a service and make possible to start it as "service blabla start".

When I type "service --statıs-all" I can't see my new project now.


Best.

carlos

unread,
Oct 14, 2013, 2:22:34 PM10/14/13
to django...@googlegroups.com


--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d38d8218-5dc5-444c-be0c-b440954cd440%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Muhammed TÜFEKYAPAN

unread,
Oct 14, 2013, 2:40:29 PM10/14/13
to django...@googlegroups.com
First of all, thanks for answer.

I read these two links but I can't find any information for my problem.

I write boot file and make required changes in the sites-avaiable folder. Even this, nginx don't see my project.

I still need help.

Javier Guerra Giraldez

unread,
Oct 14, 2013, 3:03:22 PM10/14/13
to django...@googlegroups.com
i think you're mixing two things and missing a third.

1: AFAIK, nginx doesn't have "services", just serves requests via some
methods, either static files, internal plugins or backend servers.

2: on most linux distros, the 'service' command manages startup
scripts; with start/stop commands to run daemons.

3: nginx doesn't run python applications, you have to run them in an
app server. for Django, (and most python frameworks), the best option
is a wsgi server. One that runs really well with nginx is uWSGI.
another option is to run gunicorn as an HTTP backend server behind
nginx.


so, which is your deployment strategy?
(https://docs.djangoproject.com/en/1.6/howto/deployment/)


--
Javier

Muhammed TÜFEKYAPAN

unread,
Oct 15, 2013, 5:12:36 AM10/15/13
to django...@googlegroups.com
Hello everyone,

Yes I know that but now my problem is our new project doesn't seen on services list and so I can't start it.

I use gunicorn.

How can I made it?

carlos

unread,
Oct 15, 2013, 11:18:44 AM10/15/13
to django...@googlegroups.com
Hi maybe you need use supervisord 

Cheers


--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Roberto López López

unread,
Oct 15, 2013, 11:37:46 AM10/15/13
to django...@googlegroups.com

Hi Muhammed,

I agree with Javier: a django project is never run. In your case it is deployed on gunicorn, which reads/interprets your source code. But it's never started as a service. You can run nginx as a service, though.

Roberto
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ef9db670-7a3a-4b84-837a-c9e401840452%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-- 

Roberto López López
System Developer
Parallab, Uni Computing
+47 55584091
Reply all
Reply to author
Forward
0 new messages