Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Deploying with Oil
  • I know a lot of Ruby on Rails developers can deploy with Capistrano. It's a great terminal command that can deploy code to servers, and it's quite robust, like replacing config files for different environments, migrating DB, ETC. Does anyone know if that's possible with oil? I've been using a railsless version of Capistrano for my codeigniter apps, but it's a bit wonky and I can't migrate with it, which then has to be done by hand (sorta). So, anyone have ideas in how to do this with oil?
  • I'm personally using Fabric to do this. I've been using Fabric since I learned Django, and now I use it for everything where basic git is not enough.
  • I have penned a short intro to deploying Fuel apps with capistrano in case it is of use to anyone. http://davea.posterous.com/deploying-a-fuel-php-app-with-capistrano
  • You could also use some simple scripts to update and extract a subversion (svn) (remember that?) repo to the production folder. There's lots of ways to migrate with simple bash scripts + svn + rsync I like Fredistrano but hate that it uses cake. It is horrible to update or change. I would love to port that to FuelPHP
  • Hmm I guess you could setup a task called "deploy" or something similar? If you had your code in a git repo that was accessible online or via ssh (e.g. Github), then you could write an oil task to SSH into the remote server you want to deploy to and run some git commands to pull the new code. This would be followed by:
    php oil refine migrate:current
    

    The other option is to make the remote server a "remote" in git and push to it. I know there's a way to get git to run some commands or a script following a push. I need to do something similar for one of our applications at work using Fuel so I'll post something up tomorrow hopefully with my solution.
  • Im sure I could make some sort of deploy task that does all sort of madness, but do we need to? With Capastrano, Git Deployments, DeployHQ, etc and even rsync awe already have a lot of options.
  • I'm using capistrano now. It takes just a few lines in deploy.rb to customise
    namespace :deploy do
      #no need to restart
      task :start do ; end
      task :stop do ; end
      task :restart do ; end
       
      desc "Customize migrate task to work with fuel."
      task :migrate do    
        run "php #{latest_release}/oil refine migrate #{fuel_env} "
      end
    end
    
    No need to port anything
  • I've been reading up on how Capistrano does this and soon I'm going to start porting this over to a package for Fuel very soon.
  • Ooh. Exciting. I'm looking forward to seeing what you do.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion