Symfony3 Deployment example with Capistrano

Automatic deployment is super nice way to deliver software. In the past I’ve successfully used Capifony (Symfony-o-centric Capistrano 2.x gem) for deployments. Now as Symfony3 is out with an updated structure, Capifony does not handle it anymore (or a bit of coding sweat is required) – because it’s not maintained anymore. So I’ve decided to stick with it’s ancestor – Capistrano. So lets’ start.

P.S. This is based on Capistrano v3 now.

Requirements

Gemfile:

Run:

After success, let’s start configuring Capistrano:

After successful installation there should be some new files. config folder should now contain deploy.rb and deploy folder.

Configure deployment:

config/deploy.rb:

Configure environments to deploy to – config/deploy/production.rb:

As you can definitely tell, I used lots of defaults. I am using private-key authentication, so just that is required to be preconfigured. I deploy using my local machine as well as CI server, so it’s super easy and reusable piece of code.

Transfer parameters.yml for initial deployment:

In my case, it’s located in /home/sitename.com/shared/app/config/parameters.yml

After that, first successfull deployment can by performed:

… and then a sign of success:

Success! You have successfully released your first automated release via Capistrano in under 20s including migrations, composer installation and simple asset management.

C U,
ME

188 comments

  1. Hey Àngel,

    I’ve tried Capifony in the past for my older (Symfony 2.x) projects and it worked like a charm, no issues. But Capifony is not maintained anymore so it does not support new Symfony releases – meaning it’s your own effort to keep it running now :)

  2. Hey,

    use this example but got an error on after ‘deploy:starting’, ‘composer:install_executable’ task

    The message is: The deploy has failed with an error: wrong number of arguments (0 for 1+)

     

    any idea?

  3. How Capistrano is different from Envoyer. I only prefer using Envoyer to deploy the symfony app because it makes the process easier and much quicker. Envoyer is a Laravel product, but it can be used with any PHP app. Apart from quick deployment, there is also benefit of zero downtime deployment. This means if you use Envoyer with push a branch from git, the new changes will be updated on your website without any downtime. Source: https://www.cloudways.com/blog/automate-symfony-deployment-through-envoyer/

  4. Generic Viagra Customer Reviews Forum Professional Cialis Amoxicillin Uses Sinus Infection [url=http://sildenaf100.com]viagra[/url] Giardiasis Amoxicillin Amoxicillin And Digestive Health

  5. Buy Dicyclomine With Out Prescripton Get Tadalis Sx Soft Buy Finasteride Citrate Liquid [url=http://staminamen.com]online pharmacy[/url] Propecia Rezeptfrei Osterreich

  6. [url=http://vardenafilf5h.com/]vardenafil buy[/url] [url=http://viagra0o.com/]viagra online[/url] [url=http://albuterold6j.com/]albuterol online[/url] [url=http://valtrexd7k.com/]buy valtrex online[/url]

  7. [url=http://lisinopril.us.com]lisinopril online[/url] [url=http://diflucan.us.org]cheap diflucan[/url] [url=http://tadalis.us.org]cheap tadalis[/url] [url=http://tretinoin.us.com]buy tretinoin[/url]

  8. It’s a shame you don’t have a donate button! I’d
    without a doubt donate to this brilliant blog!
    I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to brand new updates and will share this blog with my Facebook
    group. Chat soon!

  9. Great writing is essential in a treatise. However, excellent writing can certainly not make up for a scarceness of suggestions or ideas. Rather the contrary, a clear discussion constantly leaves open weak points. Each specialized phrase utilized in an argumentation should be actually determined either through a reference to a previously released definition (for basic phrases along with their usual significance) or even by a specific, unambiguous definition that looks just before the phrase is used (for a brand new term or even a typical condition made use of in an unusual way).

    [url=https://www.ukdissertations.net/dissertation-proposal/]read review[/url]

  10. Pingback: cialis price
  11. На этой странице можно посмотреть все последние серии телепроекта «[url=http://bitly.com/37FyPBv]Дом 2[/url]» онлайн.
    [url=http://bitly.com/37FyPBv]слухи и сплетни на доме 2 [/url]

  12. Pingback: Cialis 80mg otc
  13. Pingback: tadalafil 40mg uk
  14. Pingback: propecia 5 mg usa
  15. Pingback: abilify 20mg pills
  16. Pingback: actos 30 mg price
  17. Excellent blog here! Additionally your web site so much up fast!

    What host are you using? Can I am getting your associate link to your host?
    I desire my web site loaded up as fast as yours lol

  18. Pingback: avapro 300 mg nz
  19. Pingback: cardizem online

Leave a Reply

Your email address will not be published. Required fields are marked *