Get in touch



Deploying a website with Git in 6 steps

Here is a quick guide on deploying a website or web app to your production server using Git. If you would like to use something more flexible then check out Capistrano

  1. SSH into the remote server
    ssh -p port_number username@domain.com
  2. Create a directory for the bare Git repository.
    mkdir ~/git/myrepos.git

    *It is recommended to create the bare Git repository outside of the public folder so only the server can access it.

  3. Enter the newly created directory.
    cd ~/git/myrepos.git
  4. Create the bare git repository.

    git init --bare
  5. Set up the post-receive hook
    nano hooks/post-receive

    Type in the below commands.

    #!/bin/sh
    GIT_WORK_TREE=/path/to/public/folder git checkout -f

    You can also add other commands such as Composer to install dependencies

     cd /path/to/public/folder
     php composer.phar update --no-dev
    

    Save "crt+o" and Exit "crt+x".

    Set the permissions

    $ chmod +x hooks/post-receive 
  6. Now git push
    git push user@domain.com:~/git/myrepos.git

 


Bonfire - Faster CodeIgniter Development


We came across Bonfire while looking for an authentication library for CodeIgniter to help us kick start a web application we're about to start. Bonfire is a framework built on top of CodeIgniter. It'...

Read the full post

Git Basic


If you're a web developer and you're not using Distributed Version Control System (DVCS), you fall into two categories: 1) You are scared of change or 2) You have found something even better such as f...

Read the full post

Mr Pony Rebrands


Late last year we decided Mr Pony needed to rebrand to reflect who we are and the direction we are taking. We are still working on the new website (www.mrpony.com.au) so be prepared to be blown away....

Read the full post