Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
I have configured my uwsgi.ini file and its working fine with nohup. How can auto start uwsgi on boot?

Here is my uesgi.conf code

description "uWSGI"
start on runlevel [2345]
stop on runlevel [06]
respawn

env UWSGI=/usr/local/bin/uwsgi
env LOGTO=/var/log/uwsgi.log

exec $UWSGI --master --emperor /home/ubuntu/socialtalks/config --die-on-term --uid socialtalks --gid www-data --logto $LOGTO

Here is the ini file configuration.

uwsgi.ini

    [uwsgi]
# variables
#projectname = thesocialtalks
#base = /home/ubuntu/thesocialtalks

# configuration
#master = true
env = /home/ubuntu/socialtalks
#pythonpath = %(base)
#chdir = %(base)
env = DJANGO_SETTINGS_MODULE=%(projectname).settings.production
#module = thesocialtalks.wsgi:application
#socket = /tmp/%(projectname).sock

# mysite_uwsgi.ini file
[uwsgi]
projectname = socialtalks
pcre = true
base = /home/ubuntu/socialtalks
# Django-related settings
# the base directory (full path)
#chdir           = /home/ubuntu/socialtalks
chdir = %(base)
# Django's wsgi file
#module          = socialtalks.wsgi
module           = %(projectname).wsgi
# the virtualenv (full path)
#home            = /home/admin5/test/thesocialtalks_final/thesocialtalks
plugin = python37
# process-related settings
# master
master          = true
enable-threads = true

# maximum number of worker processes
processes       = 10
# the socket (use the full path to be safe
#socket          = /home/ubuntu/socialtalks/mysite.sock
socket = /tmp/%(projectname).sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
uid = www-data
gid = www-data

# clear environment on exit
vacuum          = true

I am running the script using the command

nohup uwsgi --ini config/uwsgi.ini &

How to automate my uwsgi to auto start after system boot?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You definitely can install supervisor that will allow you to run wathever programa and keep checking the state of it to be sure the program is running.

[program:test]
autostart = true
stopsignal=QUIT
user=root
command=uwsgi --master --workers  5 --disable-logging --socket 127.0.0.1:8888
--module web --callable app
priority=1
redirect_stderr=true
stdout_logfile = /data/log

To setup supervisor you can take a look of this documentation: https://www.programmersought.com/article/97941378800/ and to start supervisor at boot you can type the following command:

# Make sure Supervisor comes up after a reboot.
sudo systemctl enable supervisor

# Bring Supervisor up right now.
sudo systemctl start supervisor

To get more information you can go to the next thread: https://unix.stackexchange.com/questions/281774/ubuntu-server-16-04-cannot-get-supervisor-to-start-automatically.

I'm not an expert with UWSGI but I have seem lot of repositories working with Django and UWSGI using this combination.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda