Skip to content

deploy.rb and cap file needed to deploy a symfony 2 application to a cPanel server

Notifications You must be signed in to change notification settings

boffey/capifony-cpanel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Capifony cPanel

This is an example deploy.rb that I needed to create when deploying a Symfony2 application to a server running cPanel. Follow the step by step guide and you should be up and running.

Install Capifony 

gem install capifony

Navigate into your project and run the following command.

cd path/to/your/project
capifony .

Replace the contents of the generated deploy.rb with the one from the repo. Remember to change the boilerplate sections to relate to your needs

add the following to the Capfile in the root of your project

default_run_options[:pty] = true

Remove Incenteev Composer Parameter Handler

Remove the following lines from the composer.json file.

"incenteev/composer-parameter-handler": "~2.0"
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"incenteev-parameters": {
    "file": "app/config/parameters.yml"
},

Setup

Run the following commands

cap deploy:setup

Log into the server and copy a already configured parameters.yml or use the one provided in this repo to

shared/app/config

you may need to create this directory structure. Customise the parameters.yml file as needed.

Your should now be ready to start your first deployment. you should run the following command the first time.

cap deploy:cold

on subsequent deployments the following command should be used.

cap deploy

Cleaning Up

Once your files are on the server you need to symlink

my-app/current/web to public_html

ln -s my-app/current/web public_html

Useful Links

About

deploy.rb and cap file needed to deploy a symfony 2 application to a cPanel server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages