@@ -5,20 +5,20 @@ Deploying to Heroku Cloud
5
5
=========================
6
6
7
7
This step by step cookbook describes how to deploy a Symfony2 web application to
8
- the Heroku cloud platform. Its contents are based on `this original article `_
8
+ the Heroku cloud platform. Its contents are based on `the original article `_
9
9
published by Heroku.
10
10
11
11
Setting up
12
12
----------
13
13
14
14
To setup a new Heroku website, first `signup with Heroku `_ or sign in
15
- with your credentials. Then, download and install the `Heroku Toolbet `_ on your
15
+ with your credentials. Then download and install the `Heroku Toolbet `_ on your
16
16
local computer.
17
17
18
18
You can also check out the `getting Started with PHP on Heroku `_ guide to gain
19
19
more familiarity with the specifics of working with PHP applications on Heroku.
20
20
21
- Preparing your application
21
+ Preparing your Application
22
22
~~~~~~~~~~~~~~~~~~~~~~~~~~
23
23
24
24
Deploying a Symfony2 application to Heroku doesn't require any change in its
@@ -28,7 +28,7 @@ By default, the Symfony2 app will log into your application's ``app/log/``
28
28
directory, which isn't ideal as Heroku uses an `ephemeral file system `_. On
29
29
Heroku, the best way to handle logging is using Logplex, and the best way to
30
30
send log data to Logplex is by writing to ``STDERR `` or ``STDOUT ``. Luckily
31
- Symfony2 uses the excellent Monolog library for logging, and so a new log
31
+ Symfony2 uses the excellent Monolog library for logging and so a new log
32
32
destination is just a config file change away.
33
33
34
34
Open ``app/config/config_prod.yml `` file, locate ``monolog/handlers/nested ``
@@ -44,13 +44,12 @@ section and change the value of ``path`` from
44
44
# ...
45
45
nested :
46
46
# ...
47
- # path: %kernel.logs_dir%/%kernel.environment%.log
48
47
path : " php://stderr"
49
48
50
49
Once the application is deployed, run ``heroku logs --tail `` to keep the
51
50
stream of logs from Heroku open in your terminal.
52
51
53
- Creating a new application on Heroku
52
+ Creating a New Application on Heroku
54
53
------------------------------------
55
54
56
55
To create a new Heroku application that you can push to, use the CLI ``create ``
@@ -66,12 +65,12 @@ command:
66
65
67
66
You are now ready to deploy the application as explained in the next section.
68
67
69
- Deploying your application on Heroku
68
+ Deploying your Application on Heroku
70
69
------------------------------------
71
70
72
71
To deploy your application to Heroku, you must first create a ``Procfile ``,
73
72
which tells Heroku what command to use to launch the web server with the
74
- correct settings. After you've done that, you can simply ``git push ``, and
73
+ correct settings. After you've done that, you can simply ``git push `` and
75
74
you're done!
76
75
77
76
Creating a Procfile
@@ -175,15 +174,16 @@ Then, deploy your application executing this command:
175
174
To git@heroku.com:mighty-hamlet-1981.git
176
175
* [new branch] master -> master
177
176
178
- **And that's it! ** If you now open your browser, either by manually pointing
179
- it to the URL ``heroku create `` gave you, or by using the Heroku Toolbelt, the application will respond:
177
+ And that's it! If you now open your browser, either by manually pointing
178
+ it to the URL ``heroku create `` gave you, or by using the Heroku Toolbelt, the
179
+ application will respond:
180
180
181
181
.. code-block :: bash
182
182
183
183
$ heroku open
184
184
Opening mighty-hamlet-1981... done
185
185
186
- * Et voilà! * You should be seeing your Symfony2 application in your browser.
186
+ You should be seeing your Symfony2 application in your browser.
187
187
188
188
.. _`this original article` : https://devcenter.heroku.com/articles/getting-started-with-symfony2
189
189
.. _`signup with Heroku` : https://signup.heroku.com/signup/dc
0 commit comments