Answer the question
In order to leave comments, you need to log in
How to set up to deploy a flask application to vps, Nginx, with gunicorn?
Flask. I have static: CSS, JavaScript. HTML templates. SQLite3 database. Where should Nginx put these files?
And also how to create and bind a domain name?
For many, my question may cause a desire to discount and send to read the documentation. But, there is too much in the documentation. I don't know anything about this topic at all. So if you don't like my question, just don't answer.
And, I would like to get brief recommendations on how to configure everything described above. In what contexts of the nginx.conf configuration file what to prescribe. Maybe you still have cheat sheets when you deployed. Please tell me a short algorithm of actions.
And another question, do I need to write nginx settings in the main nginx.conf configuration file or in some other file?
Answer the question
In order to leave comments, you need to log in
The general algorithm:
1) take an example from Digitalocean or another popular site and deploy
2) make sure it works
3) see what is the difference between the hello world example that was deployed and your project, and look for examples on these topics
4) deploy your project and see what works and what doesn't
As for configs - as already mentioned, Nginx, like most programs in Linux, does not edit nginx.conf, but put additional configurations as separate configs in the appropriate directories. You will see this in every article. For example, /etc/nginx/conf.d (sites-enabled, ...)
Cover google, type "nginx flask gunicorn". The first article is https://www.digitalocean.com/community/tutorials/h...
Everything is described step by step, what is not clear here?
But oh, what a pity, there is no static here. Cover google, type "nginx flask gunicorn static files". You read what needs to be added to nginx.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question