4 ms·
Wait, how do you deploy with with scp? What happens when you drop a file locally?
by lamby 17y ago
Wait, how do you deploy with with scp? What happens when you drop a file locally?
- tibbon 17y agoHe's saying that all you have to do is post the file on a webserver with PHP installed and it should work. No compiling. No raking. No installing Passenger, Rack, etc... I'm a Ruby guy, but I do recognize that PHP deployment is generally fast, smooth and easy.
- lamby 17y agoI understand the above, I was asking something else.
- aaronblohowiak 17y agoYour app machine pulls the new version from the source machine via scp, then changes a symlink. like a poor man's rsync --backup
- tptacek 17y agoThat exact same workflow exists for Passenger. I'm not even sure you can install Rails without Rack anymore. And installing and deploying a fresh Passenger install is easier than deploying a second app on a Mongrel/Apache cluster; it is very, very easy.
- tibbon 17y agoI know the first time that I tried to set up Passenger with Sinatra- I had some issues, despite following tutorials. I kept having to touch some file to get it to read the new files and wasn't really working as expected. PHP just seems to run after I apt-get the php stuff and drop the files in there. But yes, generally Passenger does the trick.
- eli 17y agoI've consistently had problems deploying Rails apps. I can usually work through them, but it has never once been smooth. It must be me, though, because every time I mention it, someone accuses me of being an idiot or trolling.
- masomenos 17y agoIt used to be way complicated, but Passenger has made everything orders of magnitude easier. Tried it?
- neilk 17y agoI'm not sure what you mean by "drop" a file. Small websites with low cohesion between pages can probably get away with scp or rsync and nothing else. For a more highly trafficked website, you'll hide server instances from the outside world as you update their files and configuration. But this still isn't rocket science.
- mbreese 17y agoWhat I think they mean is that if you remove a file locally, it is still probably accessible on the production machine if you just use scp to copy the files over directly. Rsync is a better option for this if you want to ensure locally removed files are in fact removed on your production machine(s). I haven't done PHP work for almost 5-6 years, but when we did it, I had post-commit scripts set up in SVN (or was it CVS back then?) that if a commit was tagged "production" would trigger the production server to perform a fresh checkout. That was the only deploy step needed. Funny, but you can get the same type of setup working with any language. Scp a WAR file into the appropriate Tomcat directory and your Java project is good to go (no reloading of the appserver required). Or, if you have auto-reloading of modules setup in Python, you can do the same thing. So, this type of deployment isn't just for PHP... but with PHP it is the default (only?) method.