Provide the symfony 1.4 command line to deploy your app on a server.
git submodule add git://github.com/dator/DeployBundle.git src/Bundle/DeployBundle
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Bundle\DeployBundle\DeployBundle(),
// ...
);
}
# app/config/config.yml
deploy.config:
prod:
host: 127.0.0.1 // or the hostname
user: root
dir: /path/to/dir
port: 22
stage:
host: 127.0.0.1 // or the hostname
user: root2
dir: /path/to/dir
port: 22
Create a rsync_exclude.txt file under app/config to exclude files in your deployments.
Deployment is easy:
php app/console project:deploy --go prod
Simulate deployment
php app/console project:deploy prod
or
php app/console project:deploy --dry-run prod