Skip to content

Commit 9488a85

Browse files
committed
Updated the contents of the generic Deployment article
1 parent e5dbd49 commit 9488a85

File tree

1 file changed

+53
-65
lines changed

1 file changed

+53
-65
lines changed

cookbook/deployment/tools.rst

Lines changed: 53 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ How to Deploy a Symfony Application
88

99
.. note::
1010

11-
Deploying can be a complex and varied task depending on your setup and needs.
12-
This entry doesn't try to explain everything, but rather offers the most
13-
common requirements and ideas for deployment.
11+
Deploying can be a complex and varied task depending on the setup and
12+
requirements of your application. This article is not a step-by-step guide,
13+
but a general list of the most common requirements and ideas for deployment.
1414

1515
.. _symfony2-deployment-basics:
1616

@@ -19,26 +19,27 @@ Symfony Deployment Basics
1919

2020
The typical steps taken while deploying a Symfony application include:
2121

22-
#. Upload your modified code to the live server;
23-
#. Update your vendor dependencies (typically done via Composer, and may
22+
#. Upload your code to the production server;
23+
#. Install/update your vendor dependencies (typically done via Composer, and may
2424
be done before uploading);
2525
#. Running database migrations or similar tasks to update any changed data structures;
26-
#. Clearing (and perhaps more importantly, warming up) your cache.
26+
#. Clearing (and optionally, warming up) your cache.
2727

28-
A deployment may also include other things, such as:
28+
A deployment may also include other tasks, such as:
2929

30-
* Tagging a particular version of your code as a release in your source control repository;
30+
* Tagging a particular version of your code as a release in your source control
31+
repository;
3132
* Creating a temporary staging area to build your updated setup "offline";
3233
* Running any tests available to ensure code and/or server stability;
33-
* Removal of any unnecessary files from ``web`` to keep your production environment clean;
34+
* Removal of any unnecessary files from ``web/`` directory to keep your production
35+
environment clean;
3436
* Clearing of external cache systems (like `Memcached`_ or `Redis`_).
3537

3638
How to Deploy a Symfony Application
3739
-----------------------------------
3840

39-
There are several ways you can deploy a Symfony application.
40-
41-
Start with a few basic deployment strategies and build up from there.
41+
There are several ways you can deploy a Symfony application. Start with a few
42+
basic deployment strategies and build up from there.
4243

4344
Basic File Transfer
4445
~~~~~~~~~~~~~~~~~~~
@@ -62,12 +63,35 @@ manually taking other steps (see `Common Post-Deployment Tasks`_).
6263
Using Build Scripts and other Tools
6364
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6465

65-
There are also high-quality tools to help ease the pain of deployment. There
66-
are even a few tools which have been specifically tailored to the requirements of
67-
Symfony, and which take special care to ensure that everything before, during,
68-
and after a deployment has gone correctly.
66+
There are also tools to help ease the pain of deployment. Some of them have been
67+
specifically tailored to the requirements of Symfony.
68+
69+
`Capifony`_
70+
Provides a specialized set of tools on top of `Capistrano`_, tailored
71+
specifically to Symfony projects.
72+
73+
`sf2debpkg`_
74+
Helps you build a native Debian package for your Symfony project.
75+
76+
`Magallanes`_
77+
This Capistrano-like deployment tool is built in PHP, and may be easier
78+
for PHP developers to extend for their needs.
6979

70-
See `The Tools`_ for a list of tools that can help with deployment.
80+
Bundles
81+
There are some `bundles that add deployment features`_ directly into your
82+
Symfony console.
83+
84+
Basic scripting
85+
You can of course use shell, `Ant`_, or any other build tool to script
86+
the deploying of your project.
87+
88+
Platform as a Service Providers
89+
The Symfony Cookbook includes detailed articles for some of the most well-known
90+
Platform as a Service (PaaS) providers:
91+
92+
* :doc:`</cookbook/deployment/azure-website>`
93+
* :doc:`</cookbook/deployment/heroku>`
94+
* :doc:`</cookbook/deployment/platformsh>`
7195

7296
Common Post-Deployment Tasks
7397
----------------------------
@@ -87,12 +111,11 @@ Check if your server meets the requirements by running:
87111
B) Configure your ``app/config/parameters.yml`` File
88112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89113

90-
This file should be customized on each system. The method you use to
91-
deploy your source code should *not* deploy this file. Instead, you should
92-
set it up manually (or via some build process) on your server(s).
114+
This file should *not* be deployed, but managed through the automatic utilities
115+
provided by Symfony.
93116

94-
C) Update your Vendors
95-
~~~~~~~~~~~~~~~~~~~~~~
117+
C) Install/Update your Vendors
118+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96119

97120
Your vendors can be updated before transferring your source code (i.e.
98121
update the ``vendor/`` directory, then transfer that with your source
@@ -105,10 +128,9 @@ as you normally do:
105128
106129
.. tip::
107130

108-
The ``--optimize-autoloader`` flag makes Composer's autoloader more
109-
performant by building a "class map". The ``--no-dev`` flag
110-
ensures that development packages are not installed in the production
111-
environment.
131+
The ``--optimize-autoloader`` flag improves Composer's autoloader performance
132+
significantly by building a "class map". The ``--no-dev`` flag ensures that
133+
development packages are not installed in the production environment.
112134

113135
.. caution::
114136

@@ -152,7 +174,7 @@ Application Lifecycle: Continuous Integration, QA, etc
152174

153175
While this entry covers the technical details of deploying, the full lifecycle
154176
of taking code from development up to production may have a lot more steps
155-
(think deploying to staging, QA, running tests, etc).
177+
(think deploying to staging, QA (Quality Assurance), running tests, etc).
156178

157179
The use of staging, testing, QA, continuous integration, database migrations
158180
and the capability to roll back in case of failure are all strongly advised. There
@@ -163,51 +185,17 @@ Don't forget that deploying your application also involves updating any dependen
163185
(typically via Composer), migrating your database, clearing your cache and
164186
other potential things like pushing assets to a CDN (see `Common Post-Deployment Tasks`_).
165187

166-
The Tools
167-
---------
168-
169-
`Capifony`_:
170-
171-
This tool provides a specialized set of tools on top of Capistrano, tailored
172-
specifically to symfony and Symfony projects.
173-
174-
`sf2debpkg`_:
175-
176-
This tool helps you build a native Debian package for your Symfony project.
177-
178-
`Magallanes`_:
179-
180-
This Capistrano-like deployment tool is built in PHP, and may be easier
181-
for PHP developers to extend for their needs.
182-
183-
Bundles:
184-
185-
There are many `bundles that add deployment features`_ directly into your
186-
Symfony console.
187-
188-
Basic scripting:
189-
190-
You can of course use shell, `Ant`_, or any other build tool to script
191-
the deploying of your project.
192-
193-
Platform as a Service Providers:
194-
195-
PaaS is a relatively new way to deploy your application. Typically a PaaS
196-
will use a single configuration file in your project's root directory to
197-
determine how to build an environment on the fly that supports your software.
198-
One provider with confirmed Symfony support is `PagodaBox`_.
199-
200188
.. tip::
201189

202-
Looking for more? Talk to the community on the `Symfony IRC channel`_ #symfony
203-
(on freenode) for more information.
190+
Looking for more? Talk to the community on the `Symfony IRC channel`_ for
191+
more information.
204192

205193
.. _`Capifony`: http://capifony.org/
194+
.. _`Capistrano`: http://capistranorb.com/
206195
.. _`sf2debpkg`: https://github.com/liip/sf2debpkg
207196
.. _`Ant`: http://blog.sznapka.pl/deploying-symfony2-applications-with-ant
208-
.. _`PagodaBox`: https://github.com/jmather/pagoda-symfony-sonata-distribution/blob/master/Boxfile
209197
.. _`Magallanes`: https://github.com/andres-montanez/Magallanes
210198
.. _`bundles that add deployment features`: http://knpbundles.com/search?q=deploy
211-
.. _`Symfony IRC channel`: http://webchat.freenode.net/?channels=symfony
199+
.. _`Symfony IRC channel`: http://symfony.com/irc
212200
.. _`Memcached`: http://memcached.org/
213201
.. _`Redis`: http://redis.io/

0 commit comments

Comments
 (0)