Hello,

Is this upstart? I thought that Ubuntu doesn't use upstart any more, but that it
uses systemd instead (since version 15.04 IIRC). Maybe it contains upstart for
backwards compatibility, but I think it's not a good idea to invest in learning
upstart right now.

If you want to do it with systemd, which is what I recommend, you could try my
recorded webinar <https://www.crowdcast.io/e/deploying-django>, which also
contains a cheat sheet with the systemd configuration. Otherwise you could use
supervisor, which was the most recommended solution until recently (because
upstart and/or init scripts were cumbersome), and which people still use more
than systemd, first because systemd is newer, and second because systemd's
documentation is suboptimal so it's harder to get started.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com

On 2017-10-20 11:13, Nonverbis M wrote:
>
> *Ubuntu 16.04.3 Desktop version.*
>
> *gunicorn (version 19.7.1)*
>
> *virtualenv 15.1.0*
>
>
> I'd like Gunicorn to start on boot. Gunicorn is integrated with *Django*.
>
> *
> *
>
> */etc/init/photoarchive.conf*
>
> ||
> |description "Gunicorn server for photoarchive" start on runlevel [2345] stop
> on runlevel [!2345] respawn setuid server setgid server chdir
> /home/server/photoarchive/photoarchive exec
> /home/server/photoarchive/venv/photoarchive/bin/gunicorn photoarchive.wsgi |
>
>
> What is done for self-check:
>
> 1. 
>
> 1.
>
>     cd /home/server/photoarchive/photoarchive ls
>
> I can see manage.py.
>
> 2.
>
>
> 3.
>
>     2.
>
> 4.
>
>     cd /home/server/photoarchive/venv/photoarchive/bin/ I can see gunicorn 
> file.
>
> 5.
>
>     cd /var/log/upstart
>
> It is empty.
>
> 4.
>
>
> 5.
>
>     3. 
>
> 6.
>
>     $ ps aux | grep gunicorn
>
>     server 2715 0.0 0.0 21292 948 pts/6 S+ 10:12 0:00 grep --color=auto 
> gunicorn
>
> Well, this is grep has grepped itself.
>
>
>
> 4. 
>
> 5.
>
>     Activate virtualenv.
>
>     cd /home/server/photoarchive/photoarchive gunicorn photoarchive.wsgi
>
> Now gunicorn is running. So, manually it starts.
>
> *Could you help me organize running gunicorn on start?*
>
> -- 
> 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 [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> 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/e021369b-9846-4daf-906d-246d52b2dbbd%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e021369b-9846-4daf-906d-246d52b2dbbd%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/9750a076-d735-38f9-a0f4-4c7ead303efb%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to