Running remote tasks with symfony

I was tired of logging to production servers and clearing cache each time after deploy. So I wrote this simple plugin which allows to run any remote tasks right from your dev environment. All you need now is to type something like:

./symfony project:remote production cc

To install plugin:

  1. download attached package oxtRemoteTaskPlugin-1.0.0.tgz
  2. install it
    ./symfony plugin:install oxtRemoteTaskPlugin-1.0.0.tgz
  3. clear the cache
    ./symfony cc

Configure remote host if you haven’t done that yet:

[production]
  host=your.hostname
  port=22
  user=username
  dir=/path/to/symfony/project/

Now you are ready to run remote tasks.
If remote task consists of more than one word, enclose it in quotes, just like you do for any command line argument:

symfony project:remote production 'cc --app=frontend'

This plugin is basically a wrapper for ‘ssh’ command. It won’t work on vanilla Windows.

Tags: , , ,

AddThis Social Bookmark Button

Leave a Reply