Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
GuGuss wants to merge11 commits intosymfony:masterfromGuGuss:master
Closed
Changes from1 commit
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
PrevPrevious commit
NextNext commit
Better match Symfony documentation standard.
Based on feedbacks from@xabbuh and@timglabisch.
  • Loading branch information
Augustin Delaporte committedNov 29, 2014
commit5fd22545908a96c4c4283ceb82e721a62bfb32ff
36 changes: 16 additions & 20 deletionscookbook/deployment/platformsh.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
Deploy anExisting Site
-----------------------

In this guide,we assume your codebase is already versioned with Git.
In this guide,it is assumed your codebase is already versioned with Git.

Get aproject on Platform.sh
Get aProject on Platform.sh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You need to subscribe to a `Platform.sh project`_. Choose the development plan
and go through the checkout process.
and go through the checkout process. Once your project is ready, give it a name
and choose: **Import an existing site**.

Once your project is ready, give it a name and choose: **Import an existing
site**.

Prepare your Application
Prepare Your Application
~~~~~~~~~~~~~~~~~~~~~~~~

To deploy your Symfony application on Platform.sh, you simply need to add a
Expand All@@ -32,6 +30,7 @@ configuration files`_).

.. code-block:: yaml

# .platform.app.yaml
# This file describes an application. You can have multiple applications
Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.

Expand DownExpand Up@@ -71,13 +70,6 @@ configuration files`_).
deploy: |
app/console --env=prod cache:clear

# The configuration of scheduled execution.
# see http://symfony.com/doc/current/components/console/introduction.html
#crons:
# symfony:
# spec: "*/20 * * * *"
# cmd: "php cron.php example:test"

For best practices, you should also add a ``.platform`` folder at the root of
your Git repository which contains the following files:

Expand All@@ -97,13 +89,13 @@ your Git repository which contains the following files:

An example of these configurations can be found on `GitHub`_.

Configuredatabase access
ConfigureDatabase Access
~~~~~~~~~~~~~~~~~~~~~~~~~

Platform.sh overrides your database specific configuration via importing the
following file:

.. code-block::yaml
.. code-block::php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

please use the:: shorthand:

- following file:+ following file::- .. code-block:: php-     # app/config/parameters_platform.php

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hum, not sure what you mean?

Should I remove all.. code-block:: xx and add a:: to the previous line instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Only when

  • the highlight language is php
  • the line before ends with a colon


# app/config/parameters_platform.php
Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The 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// ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yes thet are, but our coding standards are explicitly forbidding them

<?php
Copy link
Member

Choose a reason for hiding this comment

The 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?

Expand All@@ -128,7 +120,7 @@ following file:
$container->setParameter('database_path', '');
}

#Hack.
#Store session into /tmp.
ini_set('session.save_path', '/tmp/sessions');

Make sure this file is listed in your *imports*:
Expand All@@ -147,7 +139,11 @@ command that you see on the Platform.sh web UI):

.. code-block:: bash

$ git remote add platform kjh43kbobssae@git.eu.platform.sh:kjh43kbobssae.git
$ git remote add platform [PROJECT-ID]@git.[CLUSTER].platform.sh:[PROJECT].git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

are[PROJECT-ID] and[PROJECT] supposed to be the same or no ? If yes, please use the same placeholder. If no, please also describePROJECT below



Copy link
Member

Choose a reason for hiding this comment

The 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*.
Copy link
Member

Choose a reason for hiding this comment

The 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:

Expand DownExpand Up@@ -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
Deploy a newSite
-----------------

You can start a new `Platform.sh project`_. Choose the development plan and go
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp