RESTful and HTTP APIs in Pyramid Transcripts
Chapter: Conclusion
Lecture: Lightning review: Deployment

Login or purchase this course to watch this video and the rest of the course contents.
0:01 At this point, our app was pretty much done and ready to go, but it was just on our machines, so we want to get this out on the internet
0:08 on some sort of cloud cover probably Linux, so we talked about deploying to Digital Ocean, so remember we created this Ubuntu image on Digital Ocean
0:17 and amazingly it was five dollars for this relatively high end ssd based server which is really awesome and we were going to install nginx,
0:26 and nginx is the front line web server, that's the only thing that clients actually talk to but nginx doesn't do the Python processing,
0:33 it just handles the basic web stuff and then delegates that over to μwsgi. μwsgi itself doesn't want to just run in single process mode
0:41 it wants to have a bunch of workers to help add parallelism to Python. Now, it does have a threaded mode as well for each one of the pieces
0:48 but the more worker processes the better, right, so it creates a bunch of these worker processes, and that is where our Python runs.
0:56 Request comes in, hopefully over https, and then nginx decrypts that request hands it off to us internally, and then this thing figures out
1:05 which of its internal worker processes is actually going to handle the work.
1:09 So you have a script, as well as a couple of configuration files that you can adapt and follow the script and pretty soon,
1:16 you should have a web server up and running. The first time you do it, it might take a little bit of juggling to get it to work
1:20 but with those things as your guide you will be quickly making this work and it'll be really easy for you.

Talk Python's Mastodon Michael Kennedy's Mastodon