Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Deploy Symfony application on Platform.sh.#4526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
0ada668
feb2d3b
e74458a
5fd2254
a3716d9
5e20a5e
498517d
1e715d9
6693e78
4e2e14a
c160c87
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Based on feedbacks from@xabbuh and@timglabisch.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -8,21 +8,19 @@ This step-by-step cookbook describes how to deploy a Symfony web application to | ||
`Platform.sh`_. You can read more about using Symfony with Platform.sh on the | ||
official `Platform.sh documentation`_. | ||
Deploy anExisting Site | ||
----------------------- | ||
In this guide,it is assumed your codebase is already versioned with Git. | ||
Get aProject on Platform.sh | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
You need to subscribe to a `Platform.sh project`_. Choose the development plan | ||
and go through the checkout process. Once your project is ready, give it a name | ||
and choose: **Import an existing site**. | ||
Prepare Your Application | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
To deploy your Symfony application on Platform.sh, you simply need to add a | ||
@@ -32,6 +30,7 @@ configuration files`_). | ||
.. code-block:: yaml | ||
# .platform.app.yaml | ||
# This file describes an application. You can have multiple applications | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. You could add the filename in a YAML comment like we use to do it in the documentation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. standards state that there should be an empty line between a file comment and a normal comment. | ||
# in the same project. | ||
@@ -71,13 +70,6 @@ configuration files`_). | ||
deploy: | | ||
app/console --env=prod cache:clear | ||
For best practices, you should also add a ``.platform`` folder at the root of | ||
your Git repository which contains the following files: | ||
@@ -97,13 +89,13 @@ your Git repository which contains the following files: | ||
An example of these configurations can be found on `GitHub`_. | ||
ConfigureDatabase Access | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Platform.sh overrides your database specific configuration via importing the | ||
following file: | ||
.. code-block::php | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. please use the - following file:+ following file::- .. code-block:: php- # app/config/parameters_platform.php There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Hum, not sure what you mean? Should I remove all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Only when
| ||
# app/config/parameters_platform.php | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. for PHP files, please use a PHP comment: // app/config/parameters_platform.php There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @stof sorry for being ultra-pedantic, but as you always are so precise, I just wanted to say that shell-style comments are one of the three valid styles for PHP comments. Having said this, you are absolutely right because in the rest of the Symfony documentation we always use the"one-line c++ style comment" that starts with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. yes thet are, but our coding standards are explicitly forbidding them | ||
<?php | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. we usually don't add this tag in all other examples in the docs. Is there a very good reason to do here? | ||
@@ -128,7 +120,7 @@ following file: | ||
$container->setParameter('database_path', ''); | ||
} | ||
#Store session into /tmp. | ||
ini_set('session.save_path', '/tmp/sessions'); | ||
Make sure this file is listed in your *imports*: | ||
@@ -147,7 +139,11 @@ command that you see on the Platform.sh web UI): | ||
.. code-block:: bash | ||
$ git remote add platform [PROJECT-ID]@git.[CLUSTER].platform.sh:[PROJECT].git | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. are | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. please remove this duplicated empty line | ||
* PROJECT-ID: Unique identifier of your project. Something like: *kjh43kbobssae*. | ||
* CLUSTER: Server location where your project is deployed. It can be *eu* or *us*. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. please use a definition list here: ``PROJECT-ID`` Unique identifier of your project. Something like ``kjh43kbobssae````CLUSTER`` Server location where your project is deplyed. It can be ``eu`` or ``us`` | ||
Commit the Platform.sh specific files created in the previous section: | ||
@@ -179,7 +175,7 @@ Push your code base to the newly added remote: | ||
That's it! Your application is being deployed on Platform.sh and you'll soon be | ||
able to access it in your browser. | ||
Deploy a newSite | ||
----------------- | ||
You can start a new `Platform.sh project`_. Choose the development plan and go | ||