Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# app/config/config.yml
imports:
- { resource: '%kernel.project_dir%/app/parameters.yml' }
- { resource: '%kernel.project_dir%/somefile.yml' }

.. code-block:: xml

Expand All @@ -22,11 +22,11 @@
http://symfony.com/schema/dic/services/services-1.0.xsd">

<imports>
<import resource="%kernel.project_dir%/app/parameters.yml" />
<import resource="%kernel.project_dir%/somefile.yml" />
</imports>
</container>

.. code-block:: php

// app/config/config.php
$loader->import('%kernel.project_dir%/app/parameters.yml');
$loader->import('%kernel.project_dir%/somefile.yml');
43 changes: 26 additions & 17 deletions deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,13 @@ manually taking other steps (see `Common Post-Deployment Tasks`_).
Using Platforms as a Service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The specific deployment steps vary greatly from one service provider to another,
so check out the dedicated article for the service of your choose:
Using a Platform as a Service (PaaS) can be a great way to deploy your Symfony app
quickly and easily. There are many PaaS - below are a few that work well with Symfony:

.. toctree::
:maxdepth: 1
:glob:

deployment/*
* `Heroku`_
* `Platform.sh`_
* `Azure`_
* `fortrabbit`_

Using Build Scripts and other Tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -123,18 +122,16 @@ Check if your server meets the requirements by running:

.. _b-configure-your-app-config-parameters-yml-file:

B) Configure your Parameters File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
B) Configure your Environment Variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Most Symfony applications define configuration parameters in a file called
``app/config/parameters.yml``. This file should *not* be deployed, because
Symfony generates it automatically using the ``app/config/parameters.yml.dist``
file as a template (that's why ``parameters.yml.dist`` must be committed and
deployed).
Most Symfony applications read their configuration from environment variables.
While developing locally, you'll usually store these in a ``.env`` file. But on
production, instead of creating this file, you should set *real* environment variables.

If your application uses environment variables instead of these parameters, you
must define those env vars in your production server using the tools provided by
your hosting service.
How you set environment variables, depends on your setup: they can be set at the
command line, in your Nginx configuration, or via other methods provided by your
hosting service.

C) Install/Update your Vendors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -237,6 +234,14 @@ kernel and return your project's root directory::
}
}

Learn More
----------

.. toctree::
:maxdepth: 1

deployment/proxies

.. _`Capifony`: https://github.com/everzet/capifony
.. _`Capistrano`: http://capistranorb.com/
.. _`sf2debpkg`: https://github.com/liip/sf2debpkg
Expand All @@ -249,3 +254,7 @@ kernel and return your project's root directory::
.. _`Symfony plugin`: https://github.com/capistrano/symfony/
.. _`Deployer`: http://deployer.org/
.. _`Git Tagging`: https://git-scm.com/book/en/v2/Git-Basics-Tagging
.. _`Heroku`: https://devcenter.heroku.com/articles/getting-started-with-symfony
.. _`platform.sh`: https://docs.platform.sh/frameworks/symfony.html
.. _`Azure`: https://azure.microsoft.com/en-us/develop/php/
.. _`fortrabbit`: https://help.fortrabbit.com/install-symfony
Loading