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

Appearance settings

Commit c7df320

Browse filesBrowse files
committed
[#6291] Quick proofread of new amazing fortrabbit deploy guide
1 parent a92b9be commit c7df320
Copy full SHA for c7df320

File tree

Expand file treeCollapse file tree

1 file changed

+21
-25
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-25
lines changed

‎cookbook/deployment/fortrabbit.rst

Copy file name to clipboardExpand all lines: cookbook/deployment/fortrabbit.rst
+21-25Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Deploying to fortrabbit
55
=======================
66

77
This step-by-step cookbook describes how to deploy a Symfony web application to
8-
`fortrabbit`_. You can read more about using Symfony with fortrabbit on the
9-
official fortrabbit `Symfony install guide`_.
8+
`fortrabbit`_. You can read more about using Symfony with fortrabbit on the
9+
official fortrabbit `Symfony install guide`_.
1010

1111
Setting up fortrabbit
1212
---------------------
1313

1414
Before getting started, you should have done a few things on the fortrabbit side:
1515

16-
* `Sign up`_.
17-
* Add an SSH key to your Account (to deploy via Git)
18-
* Create an App
16+
* `Sign up`_;
17+
* Add an SSH key to your Account (to deploy via Git);
18+
* Create an App.
1919

2020
Preparing your Application
2121
--------------------------
@@ -54,10 +54,7 @@ to redirect it to :phpfunction:`error_log`:
5454
5555
<monolog:config>
5656
<!-- ... -->
57-
<monolog:handler
58-
name="nested"
59-
type="error_log"
60-
/>
57+
<monolog:handler name="nested" type="error_log" />
6158
</monolog:config>
6259
</container>
6360
@@ -77,38 +74,37 @@ Configuring Database Access & Session Handler
7774
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7875

7976
You can use the fortrabbit App Secrets to attain your database credentials.
80-
Create the file ``app/config_prod_secrets.php`` with the following contents::
77+
Create the file ``app/config/config_prod_secrets.php`` with the following
78+
contents::
8179

82-
<?php
83-
// Get the path to the secrects.json file
84-
if (!$secrets = getenv("APP_SECRETS")) {
80+
// get the path to the secrects.json file
81+
$secrets = getenv("APP_SECRETS")
82+
if (!$secrets) {
8583
return;
8684
}
8785

88-
// Read the file and decode json to an array
86+
// read the file and decode json to an array
8987
$secrets = json_decode(file_get_contents($secrets), true);
9088

91-
// Set database parameters to the container
89+
// set database parameters to the container
9290
if (isset($secrets['MYSQL'])) {
93-
9491
$container->setParameter('database_driver', 'pdo_mysql');
9592
$container->setParameter('database_host', $secrets['MYSQL']['HOST']);
9693
$container->setParameter('database_name', $secrets['MYSQL']['DATABASE']);
9794
$container->setParameter('database_user', $secrets['MYSQL']['USER']);
9895
$container->setParameter('database_password', $secrets['MYSQL']['PASSWORD']);
9996
}
10097

101-
// Check if the Memcache component is present
98+
// check if the Memcache component is present
10299
if (isset($secrets['MEMCACHE'])) {
103-
104100
$memcache = $secrets['MEMCACHE'];
105101
$handlers = [];
106102

107103
foreach (range(1, $memcache['COUNT']) as $num) {
108-
$handlers [] = $memcache['HOST' . $num] . ':' . $memcache['PORT' . $num];
104+
$handlers[] = $memcache['HOST'.$num].':'.$memcache['PORT'.$num];
109105
}
110106

111-
// Apply ini settings
107+
// apply ini settings
112108
ini_set('session.save_handler', 'memcached');
113109
ini_set('session.save_path', implode(',', $handlers));
114110

@@ -119,7 +115,7 @@ Create the file ``app/config_prod_secrets.php`` with the following contents::
119115
}
120116
}
121117

122-
Make sure this file is listed in your *imports*:
118+
Make sure this file is imported into the main config file:
123119

124120
.. configuration-block::
125121

@@ -205,11 +201,11 @@ Every time you push to fortrabbit composer install runs before your code gets
205201
deployed. To finetune the deployment behavior put a `fortrabbit.yml`_. deployment
206202
file (optional) in the project root.
207203

208-
Add fortrabbit as a (additional) Git remote and add your configuration changes.
204+
Add fortrabbit as a (additional) Git remote and add your configuration changes:
209205

210206
.. code-block:: bash
211207
212-
$ git remote add fortrabbit git@deploy.eu2.frbit.com:your-app.git
208+
$ git remote add fortrabbit git@deploy.eu2.frbit.com:<your-app>.git
213209
$ git add composer.json composer.lock
214210
$ git add app/config/config_prod_secrets.php
215211
@@ -222,7 +218,7 @@ Commit and push
222218
223219
.. note::
224220

225-
Replace your-app with the name of your fortrabbit App.
221+
Replace ``<your-app>`` with the name of your fortrabbit App.
226222

227223
.. code-block:: bash
228224
@@ -286,4 +282,4 @@ documentation.
286282
.. _`Symfony install guide`: https://help.fortrabbit.com/install-symfony
287283
.. _`fortrabbit.yml`: https://help.fortrabbit.com/deployment-file-v2
288284
.. _`database migrations and tunneling`: https://help.fortrabbit.com/install-symfony-2#toc-migrate-amp-other-database-commands
289-
.. _`Sign up`: https://dashboard.fortrabbit.com
285+
.. _`Sign up`: https://dashboard.fortrabbit.com

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.