I'm a brand new WebFaction user, and relatively new to Python and Flask. I've built out a couple of apps before hosted on Heroku but this will be my first time doing much of the config myself. I'd like to ask a few questions about the way others deploy their apps to the server. This is a basic website for a photographer with dynamic gallery routes which will pull JSON data from the database. If it matters, here's a static version: http://rk.commadelimited.com/ First off, here's some details about my app: Directory structure
Procfile
requirements.txt
I'm currently running the app locally using 1) How do I set up the server so that it runs all the time? 2) I've heard people talk about using a web server for funneling assets (css, js, imgs) while mod_wsgi serves the Python content. Right now my assets are being referenced using /static/<asset>. Is this a problem when deploying to WebFaction? 3) How do I actually deploy? The website already has a Git repo hosted on Github. Is it possible for me to dev locally, commit to Github then pull from Github to the server? I'm sure I'll have more questions later, but this should get me going. Thanks in advance. asked 12 Mar '13, 00:26 commadelimited |
The best way to do this, in my opinion, is to use cron. A full example of a script which can very reliably keep a program running is available here.
It's not a problem, and in fact mapping all of your static assets under the "
Certainly. Hope that helps! answered 12 Mar '13, 01:55 ryans ♦♦ Hey Ryan... I'm trying to walk through your suggestions and I'm doing okay so far....but I'm sort of stuck on the "static" website part. I've logged in to the control panel and done the following:
But when I try to add richkphoto.com/static it tells me that it's not a valid domain name. I've also tried www.richkphoto.com/static with the same results. Am I doing something wrong? Also, on a related note, what would you say is the best option for uploading content from my local machine into the static directory?
(19 Mar '13, 20:18)
commadelimited
You may submit a support ticket and we can investigate further. I personally use FileZilla with SFTP to move content to the server.
(19 Mar '13, 21:43)
johns
Okay. One more question and then I think I might be done. Thanks to Valentin (hi Valentin) I got my static files issue resolved. Now I'm ready to get this website up and running and I'm at a loss on how to do it. I originally created a mod_wsgi 3.4/Python 2.7 app which was located at
which is the output of the
Because index.py was clearly being rendered I tried renaming my app.py to index.py but that didn't work. I'm sure I'm missing something but I could use some guidance please. Thanks in advance.
(21 Mar '13, 21:03)
commadelimited
Add something like this to your
... then restart your Apache.
(22 Mar '13, 11:00)
seanf
|