Skip to content

Commit f37ee12

Browse files
committed
minor #8721 Overhaul Deployment + a few other tweaks (weaverryan)
This PR was squashed before being merged into the 4.0 branch (closes #8721). Discussion ---------- Overhaul Deployment + a few other tweaks This removes all of the PAAS articles. I *really* like mentioning great PaaS, but it doesn't make sense for us to maintain the articles (and in practice, we don't maintain them). So, I've removed all of the articles. Ping @dzuelke, @Crell & @ostark. I just want you guys to be aware of this :). This updates `deployment.rst` to mention environment variables. But my description is SUPER weak (https://github.com/symfony/symfony-docs/pull/8721/files#diff-7691c197e7985b35df39ae74d6d58b8dR128)! My impression is that (outside a PaaS), setting environment variables is a pain, and varies widely. I want to give a better recommendation that I am right now. Commits ------- 3e463f6 updating link to be version independent 5b6ef2a linking directly and marking articles as orphans 9a1695d linking to missing article bbffb1a Removing all PAAS deployment articles b563ab2 using different example
2 parents 060cd36 + 3e463f6 commit f37ee12

File tree

6 files changed

+53
-1267
lines changed

6 files changed

+53
-1267
lines changed

components/dependency_injection/_imports-parameters-note.rst.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# app/config/config.yml
1212
imports:
13-
- { resource: '%kernel.project_dir%/app/parameters.yml' }
13+
- { resource: '%kernel.project_dir%/somefile.yml' }
1414

1515
.. code-block:: xml
1616

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

2424
<imports>
25-
<import resource="%kernel.project_dir%/app/parameters.yml" />
25+
<import resource="%kernel.project_dir%/somefile.yml" />
2626
</imports>
2727
</container>
2828

2929
.. code-block:: php
3030

3131
// app/config/config.php
32-
$loader->import('%kernel.project_dir%/app/parameters.yml');
32+
$loader->import('%kernel.project_dir%/somefile.yml');

deployment.rst

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ manually taking other steps (see `Common Post-Deployment Tasks`_).
6363
Using Platforms as a Service
6464
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6565

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

69-
.. toctree::
70-
:maxdepth: 1
71-
:glob:
72-
73-
deployment/*
69+
* `Heroku`_
70+
* `Platform.sh`_
71+
* `Azure`_
72+
* `fortrabbit`_
7473

7574
Using Build Scripts and other Tools
7675
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -123,18 +122,16 @@ Check if your server meets the requirements by running:
123122
124123
.. _b-configure-your-app-config-parameters-yml-file:
125124

126-
B) Configure your Parameters File
127-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125+
B) Configure your Environment Variables
126+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128127

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

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

139136
C) Install/Update your Vendors
140137
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -237,6 +234,14 @@ kernel and return your project's root directory::
237234
}
238235
}
239236

237+
Learn More
238+
----------
239+
240+
.. toctree::
241+
:maxdepth: 1
242+
243+
deployment/proxies
244+
240245
.. _`Capifony`: https://github.com/everzet/capifony
241246
.. _`Capistrano`: http://capistranorb.com/
242247
.. _`sf2debpkg`: https://github.com/liip/sf2debpkg
@@ -249,3 +254,7 @@ kernel and return your project's root directory::
249254
.. _`Symfony plugin`: https://github.com/capistrano/symfony/
250255
.. _`Deployer`: http://deployer.org/
251256
.. _`Git Tagging`: https://git-scm.com/book/en/v2/Git-Basics-Tagging
257+
.. _`Heroku`: https://devcenter.heroku.com/articles/getting-started-with-symfony
258+
.. _`platform.sh`: https://docs.platform.sh/frameworks/symfony.html
259+
.. _`Azure`: https://azure.microsoft.com/en-us/develop/php/
260+
.. _`fortrabbit`: https://help.fortrabbit.com/install-symfony

0 commit comments

Comments
 (0)