Development workflow, Joomla, GIT

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

I am launching a website that is currently using SOBI2. SOBI2 will be replaced by a special component that I create using the Nooku Framework.

What I have is installing Joomla on my localhost. The Nooku Framework and my custom component are in their own directories on my computer, and then are symbolically attached to the Joomla installation. I do this because it’s nice to separate them during development. Then my custom component is tracked using GIT, and Nooku is tracked in its open SVN repo. I assume this is a pretty standard setting.

So now I want to clone my LIVE installation of Joomla to my local host and track it with GIT so that I can easily transfer the changes to my live server. The site is not versioned right now.

So how do I do this easily?

I guess it is better to use two GIT repositories, one of which contains only my custom component and one for the entire site. Then the workflow will be the same as when developing my custom component and site:

  • Make changes to the custom component and test in an empty Joomla installation
  • Commit changes.
  • Check out the changes from my custom repo component to my local site (mirror live site via GIT).
  • Make sure everything works.
  • Commit and push changes to GIT repo sites.
  • Pull the changes from the repo sites to the server.

Database update should be handled manually, I think.

  • Is this a good way to work?
  • How to track a custom component inside my local site? I heard about GIT Submodules, is that what it was used for?

  • Any good guides for this kind of thing?

Regards Linus

+4
source share
1 answer

We do this as follows, but using the Mercurial Source Control Tool :

  • Checkout empty storage from a bitbucket (or create a local one)
  • Install Joomla! to this folder
  • Add all the basic joomla files and components to .hgignore and make sure that they are not perfect.
  • Add only components, plugins, modules that we develop to the repository.

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

Then we check the repository on the production server, and then install Joomla! there. (First check, and then install only Joomla). When we check the repo for production or anywhere else, only our files are scanned.

Usually, to change the database, we have a db folder (or any other name), and we simply add SQL files with 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

+3
source

All Articles