Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Development workflow, Joomla, GIT

I have some questions about how you set up your development environment.

I'm running a website that's currently using SOBI2. SOBI2 is going to be replaced by a custom component I'm creating using Nooku Framework.

What I have so far is a Joomla install on my localhost. Nooku Framework and my custom component is in their own directories on my computer and then symlinked to the Joomla installation. I do this because it's nice to have them separated when developing. My custom component is then tracked using GIT and Nooku is tracked in their public SVN repo. I guess this is a pretty standard setup.

So, now I want to clone my LIVE Joomla installation to my localhost and track it using GIT to be able to push changes easily to my live server. Right now the live site is not version controlled at all.

So, how do I do this easily?

I guess it's best to use two GIT repos, one containing only my custom component and one for the entire site. The workflow would then be something like this when developing my custom component and site:

  1. Make changes to custom component and test in empty Joomla install
  2. Commit changes.
  3. Pull in changes from my custom component repo to my local site (mirror of the live site through GIT).
  4. Make sure everything is working.
  5. Commit and push changes to the sites GIT repo.
  6. Pull in changes from the sites repo to the live server.

Database updates has to be handled manually I guess.

  • Is this a good way of working?
  • How do I track the custom component inside my local site? I've heard about GIT Submodules, is this what it's used for?

  • Any good guides out there for this kind of stuff?

Best Regards Linus

like image 653
Linus Avatar asked Jun 27 '11 18:06

Linus


1 Answers

We do it in the following way, but using the Mercurial source code management tool:

  • Checkout empty repository from the bitbucket(or create local)
  • Install Joomla! into that folder
  • Add to .hgignore all the core joomla files and components and make sure they will not be committed
  • Add to the repository only the components, plugins, modules that we develop

So basically we have Joomla inside our repository folder, but all its files are ignored, and do not get committed — except for the files of our own components.

Then we check out the repository to the production server, and then install Joomla! there. (First checkout, and then only install Joomla). When we check out the repo to production or any other place, only our files are checked out.

For database changes usually we have a db folder (or whatever the name is), and we just add the SQL files with the scripts that make changes to the database. You can easily call them with a command like mysql -uUser -pPass dbname < 12.table_name.change_name.sql

like image 178
Azamat Tokhtaev Avatar answered Sep 21 '22 19:09

Azamat Tokhtaev