by KnightWhoSaysNi · 15y ago · 0 comments
Matters for a single 15 years-old developer. Deployment is never easy when you get do anything non-trivial, and the cheap hosting... hosting for other languages start at $5 or $10... The only cheaper hostage PHP has is free.
> good documentation
That's highly debatable. I've also seen the PHP doc comments being pimped, I could never find anything worth more than a laugh in that cesspool.
Node.js wins for deployment if you ask me. Node.js + riak handily beats the pants off of the LAMP stack. It's so easy I'll tell you how to do it right now:
1. Install node, ./configure && make && make install
2. Install riak, make all rel && mv rel/riak /usr/local && export PATH="/usr/local/riak/bin:$PATH"
3. Install your app: scp -r remote:/my/app /web
4. Install dependencies: cd /web/app && npm install
5. Run your app: node /web/app/do/something/cool.js
Back to my coffee.(I'm being somewhat facetious and these instructions don't get you startup services and such, but I do believe that Node.js stacks are much simpler than traditional stacks and easier for devs that have to wear the sysadmin hat too)
Noobs can't do what you just outlined; they'll be puzzled the first time one of the commands fail (missing compiler, failed dependencies, whatever).
It's just as easy to get mod_python working as it is mod_php.
Compare that to getting CodeIgniter up and running: SFTP the files into the server, and you're up. No server configuration needed.
One could argue that this is not a feature of PHP itself, but that doesn't change the fact that "normal" PHP solutions are simply faster to get up and running.
mod_wsgi on the other hand... 4 lines in your apache config file. 6 if you're using a daemon process (which is better).
Let's take your VPS example. Install nginx, gunicorn, and your database of choice. Set up gunicorn to serve your app, set up nginx to serve static and proxy to your gunicorn instance. Do any app-specific setup.
That doesn't take any longer than deploying a PHP app, at least not for me.
Can't speak for rails, but for Django we're talking 15 lines and a pair of commands for a clean setup:
* Create a virtualenv with all your dependencies and your django application checked out (0 lines)
* Extract static files to whatever directory you're serving static files from (1 command in 1.3)
* Create your wsgi handler script (4 lines, because you have to setup the DJANGO_SETTINGS_MODULE env)
* WSGIScriptAlias and the relevant directory allow (5 lines)
* WSGIDaemonProcess and WSGIProcessGroup configuration directives (2 lines)
done.