Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: Deployment
Lecture: Setting up our code
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Now we have our code that we want to run over here on GitHub, right? If we got source, 15, final deploy I haven't shown you this running
0:08
but this is the final thing that we do want to run here. So what we're going to do is we're going to clone this repo so SSH back to our server
0:23
go to the apps, I want to say Git clone that. I want to be very careful about the directory that I'm going to put it in.
0:30
Going to clone it into app_repo just so the file names are a little bit shorter. Like that. This is public, so it doesn't ask us what's our
0:40
username and password but if you were cloning your private app which very likely you would be it would need you to log in
0:48
but that caching stuff would mean just the once until you reboot. Okay, so this looks good. If we go to app, source, Chapter 15.
1:01
Here you can see our files here's our servers stuff which we're going to need in a little bit
1:05
here's our production.ini that we're going to need and so on. So we've gotten our files onto the server. We have our virtual environment active.
1:14
'Member, what we're going to need to do is we need to say Python, and be careful you want to make sure it's the virtual environment one
1:21
that means it's Python 3. Good. We want to remember to do Python setup.py develop Think we should be able to run this let's see really quick here.
1:38
So we should be able to say pserve development.ini. And look at that, it's listening. If we go log in in another terminal window
1:50
now we have HTTP, that's the httpy command and you hit that, and what do we get? Boom, that looks a whole lot like our little
2:00
boot-strappy site that we wrote. Pretty darn cool, I would say. Now, be careful, it does have the debug toolbar
2:07
that's because we ran the debug command over here the development command and we're not going to do that on uWSGI. Okay, so it looks like we got this
2:15
all setup and working, more or less.