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,
0:03 but it was just on our machines, so we want to get this out on the internet
0:07 on some sort of cloud cover probably Linux,
0:10 so we talked about deploying to Digital Ocean,
0:12 so remember we created this Ubuntu image on Digital Ocean
0:16 and amazingly it was five dollars for this relatively high end
0:20 ssd based server which is really awesome
0:23 and we were going to install nginx,
0:25 and nginx is the front line web server,
0:27 that's the only thing that clients actually talk to
0:29 but nginx doesn't do the python processing,
0:32 it just handles the basic web stuff and then delegates that over to μwsgi.
0:36 μwsgi itself doesn't want to just run in single process mode
0:40 it wants to have a bunch of workers to help add parallelism to python.
0:44 Now, it does have a threaded mode as well for each one of the pieces
0:47 but the more worker processes the better, right,
0:50 so it creates a bunch of these worker processes,
0:53 and that is where our python runs.
0:55 Request comes in, hopefully over https, and then nginx decrypts that request
1:00 hands it off to us internally, and then this thing figures out
1:04 which of its internal worker processes is actually going to handle the work.
1:08 So you have a script, as well as a couple of configuration files that you can adapt
1:12 and follow the script and pretty soon,
1:15 you should have a web server up and running.
1:17 The first time you do it, it might take a little bit of juggling to get it to work
1:19 but with those things as your guide you will be quickly making this work
1:23 and it'll be really easy for you.