0

So, I am right now at this point. The webpage can be accessed without any errors and without using any specific port. Example: www.my-example.com.

But, this works only when I run the command "uwsgi --socket 0.0.0.0:4567 --protocol=http -w wsgi" in my server.

How to automate this app deployment through nginx?

1 Answer 1

1

You can use something like Supervisor to automatically start uWSGI, restart it if it fails, and log stderr/stdout:

[program:app]

# emulates a virtualenv
directory    = /srv/app/
environment  = PATH="/srv/app/virtualenv/bin"

command      = /srv/app/virtualenv/bin/uwsgi --ini /srv/app/config/uwsgi.ini
autostart    = true
autorestart  = true

user         = app-user
Sign up to request clarification or add additional context in comments.

2 Comments

Can you explain a bit more about this?
@GokilaDorai: Supervisor is a daemon that is launched when your server boots. It autostarts uWSGI and restarts it if it fails, so you don't need to run anything manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.