Note that there are some explanatory texts on larger screens.

plurals
  1. POmost easy, reliable, cheap way to deploy this python (workhorse) app with a PHP frontend?
    text
    copied!<p>I am developing a small part of a PHP application with some python code. The python code runs like an <strong>equivalent of a servlet</strong> (listens and responds to HTTP on port 8765) on localhost. The PHP app calls it like:</p> <pre><code>PHP'S_CURL("http://localhost:8765/search?term=electrical+design") </code></pre> <p>The pyth-let is written with the BaseHTTPServer module like:</p> <pre><code>class MyHandler(BaseHTTPRequestHandler): def do_GET(self): if self.path=="/search": self.send_response(200) # .... self.wfile.write(st) </code></pre> <p>It works on my workstation and my colleague's. I now want to <strong>deploy it in a production environment</strong>, with modifications. The idea in mind is that I should:</p> <ol> <li>modify my app to FCGI</li> <li>get an inexpensive VPS account</li> <li>set Apache to use FCGI to spawn and keep alive both the PHP app and the pyth-let.</li> </ol> <p>So it's a localhost app, which <strong>shouldnt be exposed publically</strong>. There should be reliable way to <strong>keep it alive</strong>. We expect ~800 hits a day before needing an upgrade, so only a single instance need be kept alive.</p> <p>Is there a feasible way to do this on a popular shared host, rather than a VPS? Am I on the right track with my above-mentioned plan?</p> <hr> <p><strong>Postscipts</strong> I mentioned "easy, reliable, cheap way" and by "way" I meant both the development direction as well as a good (cheap) hosting plan that can support it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload