@@ -8,21 +8,19 @@ This step-by-step cookbook describes how to deploy a Symfony web application to
8
8
`Platform.sh `_. You can read more about using Symfony with Platform.sh on the
9
9
official `Platform.sh documentation `_.
10
10
11
- Deploy an existing site
11
+ Deploy an Existing Site
12
12
-----------------------
13
13
14
- In this guide, we assume your codebase is already versioned with Git.
14
+ In this guide, it is assumed your codebase is already versioned with Git.
15
15
16
- Get a project on Platform.sh
16
+ Get a Project on Platform.sh
17
17
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
18
19
19
You need to subscribe to a `Platform.sh project `_. Choose the development plan
20
- and go through the checkout process.
20
+ and go through the checkout process. Once your project is ready, give it a name
21
+ and choose: **Import an existing site **.
21
22
22
- Once your project is ready, give it a name and choose: **Import an existing
23
- site **.
24
-
25
- Prepare your Application
23
+ Prepare Your Application
26
24
~~~~~~~~~~~~~~~~~~~~~~~~
27
25
28
26
To deploy your Symfony application on Platform.sh, you simply need to add a
@@ -32,6 +30,7 @@ configuration files`_).
32
30
33
31
.. code-block :: yaml
34
32
33
+ # .platform.app.yaml
35
34
# This file describes an application. You can have multiple applications
36
35
# in the same project.
37
36
@@ -71,13 +70,6 @@ configuration files`_).
71
70
deploy : |
72
71
app/console --env=prod cache:clear
73
72
74
- # The configuration of scheduled execution.
75
- # see http://symfony.com/doc/current/components/console/introduction.html
76
- # crons:
77
- # symfony:
78
- # spec: "*/20 * * * *"
79
- # cmd: "php cron.php example:test"
80
-
81
73
For best practices, you should also add a ``.platform `` folder at the root of
82
74
your Git repository which contains the following files:
83
75
@@ -97,13 +89,13 @@ your Git repository which contains the following files:
97
89
98
90
An example of these configurations can be found on `GitHub `_.
99
91
100
- Configure database access
92
+ Configure Database Access
101
93
~~~~~~~~~~~~~~~~~~~~~~~~~
102
94
103
95
Platform.sh overrides your database specific configuration via importing the
104
96
following file:
105
97
106
- .. code-block :: yaml
98
+ .. code-block :: php
107
99
108
100
# app/config/parameters_platform.php
109
101
<?php
@@ -128,7 +120,7 @@ following file:
128
120
$container->setParameter('database_path', '');
129
121
}
130
122
131
- # Hack .
123
+ # Store session into /tmp .
132
124
ini_set('session.save_path', '/tmp/sessions');
133
125
134
126
Make sure this file is listed in your *imports *:
@@ -147,7 +139,11 @@ command that you see on the Platform.sh web UI):
147
139
148
140
.. code-block :: bash
149
141
150
- $ git remote add platform kjh43kbobssae@git.eu.platform.sh:kjh43kbobssae.git
142
+ $ git remote add platform [PROJECT-ID]@git.[CLUSTER].platform.sh:[PROJECT].git
143
+
144
+
145
+ * PROJECT-ID: Unique identifier of your project. Something like: *kjh43kbobssae *.
146
+ * CLUSTER: Server location where your project is deployed. It can be *eu * or *us *.
151
147
152
148
Commit the Platform.sh specific files created in the previous section:
153
149
@@ -179,7 +175,7 @@ Push your code base to the newly added remote:
179
175
That's it! Your application is being deployed on Platform.sh and you'll soon be
180
176
able to access it in your browser.
181
177
182
- Deploy a new site
178
+ Deploy a new Site
183
179
-----------------
184
180
185
181
You can start a new `Platform.sh project `_. Choose the development plan and go
0 commit comments