@@ -69,14 +69,21 @@ You are now ready to deploy the application as explained in the next section.
69
69
Deploying your Application on Heroku
70
70
------------------------------------
71
71
72
- To deploy your application to Heroku, you must first create a ``Procfile ``,
73
- which tells Heroku what command to use to launch the web server with the
74
- correct document root. After that, you will ensure that your Symfony application
75
- runs the ``prod `` environment, and then you'll be ready to ``git push `` to
76
- Heroku for your first deploy!
72
+ Before your first deploy, you need to do just 2 more things, which are explained
73
+ below:
77
74
78
- Creating a Procfile
79
- ~~~~~~~~~~~~~~~~~~~
75
+ 1. :ref: `Create a Procfile <heroku-procfile >`
76
+
77
+ 2. :ref: `Set the Environment to prod <heroku-setting-env-to-prod >`
78
+
79
+ Then you'll be ready for the last step:
80
+
81
+ 3. :ref: `Push your Code to Heroku <heroku-push-code >`
82
+
83
+ .. _heroku-procfile :
84
+
85
+ 1) Create a Procfile
86
+ ~~~~~~~~~~~~~~~~~~~~
80
87
81
88
By default, Heroku will launch an Apache web server together with PHP to serve
82
89
applications. However, two special circumstances apply to Symfony applications:
@@ -111,8 +118,10 @@ create the ``Procfile`` file and to add it to the repository:
111
118
[master 35075db] Procfile for Apache and PHP
112
119
1 file changed, 1 insertion(+)
113
120
114
- Setting the ``prod `` Environment
115
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
+ .. _heroku-setting-env-to-prod :
122
+
123
+ 2) Set the Environment to prod
124
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116
125
117
126
During a deploy, Heroku runs ``composer install --no-dev `` to install all of the
118
127
dependencies your application requires. However, typical `post-install-commands `_
@@ -132,8 +141,10 @@ variables, you can issue a single command to prepare your app for a deployment:
132
141
133
142
$ heroku config:set SYMFONY_ENV=prod
134
143
135
- Pushing to Heroku
136
- ~~~~~~~~~~~~~~~~~
144
+ .. _heroku-push-code :
145
+
146
+ 3) Push your Code to Heroku
147
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
148
138
149
Next up, it's finally time to deploy your application to Heroku. If you are
139
150
doing this for the very first time, you may see a message such as the following:
0 commit comments