5 ms·
As a Django dev, I don't think its anywhere as easy to deploy Django as PHP.
by collyw 10y ago
As a Django dev, I don't think its anywhere as easy to deploy Django as PHP.
- ben_jones 10y agoIt's literally six or seven lines in an Ansible playbook
- djm_ 10y agoLearning Ansible is not easier than dragging and dropping a file onto a server and having it run with no extra work. They weren't saying it was hard but that it is not as easy as PHP. PHP is one level up from a static site for most beginners, you can simply drag and drop a file on many shared web hosts and get going. That is the attraction.
- onion2k 10y agoThat's was the attraction. I guess it still is for very simple web apps that one person can build. It's been a while since I've worked on anything like that. It's probably been a few years since I've even signed up for any service like that. The web has moved on to building more scalable things. If you're writing something moderately complex then you're very likely to be running it on a virtual instance (maybe more than one) on AWS/Digital Ocean/etc, and if that's the case then you'll go much faster if you have a testable, reproducible build process that your development team can tear down and build back up easily. That is much more complicated than FTP'ing a few scripts to a server and importing a SQL script with PHPMyAdmin, but at the same time, as soon as your service hits a few thousand users with hundreds of them accessing it concurrently, your PHP script FTP'd to a shared server probably isn't going to work very well. Learning new things is not a reason to avoid moving forwards. If anything, it's why I got in to web dev in the first place. New things are what make it interesting. I don't learn all of them, and I don't switch tools very often, but sometimes something comes along that makes life better. Reproducible builds with Ansible/Puppet/Chef/etc is one of those things.
- coldtea 10y ago>That's was the attraction. I guess it still is for very simple web apps that one person can build. It's better to insist on simplicity at every level, whether you're building "simple one-person web apps" or "complex large-team" ones. In fact simplicity at every level would be even more beneficial in the latter case. So I find this "dead easy deploy is only beneficial for small apps" dichotomy false.
- onion2k 10y agoIt's a great deal simpler to have a process that runs when code is merged in to a repo than to have a manual process of copying files to a server that relies on a human getting things right. "Dead easy to deploy" these days means "create a process that can run automatically, that checks things worked correctly, and rolls back changes if things go wrong". Doing those things manually is not simple. If a deploy fails and a client is panicking because their app isn't available, the last thing you want is a team of stressed developers trying to work out which files they need to revert. "Simple" doesn't mean "easy".
- coldtea 10y ago>It's a great deal simpler to have a process that runs when code is merged in to a repo than to have a manual process of copying files to a server that relies on a human getting things right. Who said it's has to be either one or the other? The "manual process of copying files to a server" can be done simply by a person for a small scale project, and it also can be automated any way one likes -- e.g. to "automatic copy files to a server when code is merged in to a repo". "Copy a file to a directory and the server just works and shows it" doesn't imply manual ftp uploading or manual editing of any kind -- it's just so flexible and easy that can it work that way too. And if anything breaks, it's still simpler to find out what went wrong -- as opposed to some convoluted server deployment process with more moving parts.
- deleted 10y ago[deleted]
- mrweasel 10y agoI would rather work with Pythons virtualenv and pip for dependency management, than I would PHPs Composer. In terms of initial setup of an application than doesn't use anything but the standard library in either language I would completely agree with you. Edit: Composer, not Artisan as dependency manager in PHP.
- zeitg3ist 10y agoHaving worked with both I can say that composer feels way more modern than pip.
- jbrooksuk 10y agoAs in Laravel Artisan? That's not a dependency manager. Granted, Composer is slow, but it works so well, mainly when package developers tag and release packages properly though. What issues do you have with it?
- trebor 10y agoIf you have XDebug enabled it will slow Composer, but also several patches near the official 1.0 release improved speed massively. If you haven't tried it recently, you should try Composer again.
- spdionis 10y agoExcept some performance issues composer is GREAT though.
- Navarr 10y agoI install prestissimo[1] everywhere now. It improves speed so much. "composer parallel install plugin" is what it calls itself - it downloads all the repositories before composer gets to the install step and then composer just loads everything from cache - super fast! [1]: https://github.com/hirak/prestissimo https://github.com/hirak/prestissimo
- 10y ago
- ergo14 10y agoHave you ever configured a secure setup for php+httpd? Because it is much easier to deploy a secure userspace python app outside of context of webserver and just proxy to it.
- fredsted 10y agoJust run php cgi/fpm as another user? What am I missing?
- ergo14 10y agoOpen basedir config, separate /tmp, insecure function blacklisting... tons of stuff, php-fpm is the starting point - yes. It takes much more manual work to set everything correctly than running a python application.