Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best process / app for automated deployment of PHP apps?

Tags:

php

deployment

There's another post on SO relating to .NET -- not us. Pure PHP. Trying to find the best way/process to deploy stable version of our PHP app. I've seen an article on Capistrano, but am curious what else is out there. Aside from the obvious reasons, I'm also looking to add some scripting so that the SVN rev number gets added in there as well.

Much thanks.

like image 517
jmccartie Avatar asked Oct 04 '08 07:10

jmccartie


2 Answers

I've used a home-grown script for quite some time. It will (based on an application configuration file):

  1. Run svn export on the repository based on a tag.
  2. Package the export into a tar or zip file, which includes the tag in the name.
  3. Use scp to copy the package to the appropriate server (QA or release).
  4. Connect to the server with ssh to install the package and run post-install scripts.

The application configuration file is part of the project. It can tell the script (at step 2) to strip paths and otherwise process specified files. It also specifies server names and how to handle externals.

I've recently migrated the script to support Git as well as Subversion. I'm also probably going to migrate it to PHP since we're now running in a mixed (Linux and Windows) set up, with Linux now in the minority.

I have plans to automatically call the script with post-commit hooks, but haven't had the need to implement that just yet.

like image 184
Michael Johnson Avatar answered Oct 07 '22 03:10

Michael Johnson


Coincidentally, I was just reading about an Apache Ant/gnu make like build tool called Phing. What I like about it is the ability to write custom extensions in PHP!

like image 37
Nick Stinemates Avatar answered Oct 07 '22 02:10

Nick Stinemates