@@ -183,7 +183,7 @@ If this is the first time you run the proxy, you must follow these additional st
183
183
184
184
* Open the **network configuration ** of your operating system;
185
185
* Find the **proxy settings ** and select the **"Automatic Proxy Configuration" **;
186
- * Set the following URL as its value: ``https ://127.0.0.1:7080/proxy.pac ``
186
+ * Set the following URL as its value: ``http ://127.0.0.1:7080/proxy.pac ``
187
187
188
188
Defining the Local Domain
189
189
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -202,15 +202,15 @@ new custom domain.
202
202
203
203
.. tip ::
204
204
205
- Browse the https ://127.0.0.1:7080 URL to get the full list of local project
205
+ Browse the http ://127.0.0.1:7080 URL to get the full list of local project
206
206
directories, their custom domains, and port numbers.
207
207
208
208
When running console commands, add the ``HTTPS_PROXY `` env var to make custom
209
209
domains work:
210
210
211
211
.. code-block :: terminal
212
212
213
- $ HTTPS_PROXY=https ://127.0.0.1:7080 curl https://my-domain.wip
213
+ $ HTTPS_PROXY=http ://127.0.0.1:7080 curl https://my-domain.wip
214
214
215
215
.. tip ::
216
216
@@ -244,6 +244,72 @@ server provides a ``run`` command to wrap them as follows:
244
244
# stop the web server (and all the associated commands) when you are finished
245
245
$ symfony server:stop
246
246
247
+ Docker Integration
248
+ ------------------
249
+
250
+ The local Symfony server provides full `Docker `_ integration for projects that
251
+ use it. First, make sure to expose the container ports:
252
+
253
+ .. code-block :: yaml
254
+
255
+ # docker-compose.override.yaml
256
+ services :
257
+ database :
258
+ ports :
259
+ - " 3306"
260
+
261
+ redis :
262
+ ports :
263
+ - " 6379"
264
+
265
+ # ...
266
+
267
+ Then, check your service names and update them if needed (Symfony creates
268
+ environment variables following the name of the services so they can be
269
+ autoconfigured):
270
+
271
+ .. code-block :: yaml
272
+
273
+ # docker-compose.yaml
274
+ services :
275
+ # DATABASE_URL
276
+ database : ...
277
+ # MONGODB_DATABASE, MONGODB_SERVER
278
+ mongodb : ...
279
+ # REDIS_URL
280
+ redis : ...
281
+ # ELASTISEARCH_HOST, ELASTICSEARCH_PORT
282
+ elasticsearch : ...
283
+ # RABBITMQ_DSN
284
+ rabbitmq : ...
285
+
286
+ If your ``docker-compose.yaml `` file doesn't use the environment variable names
287
+ expected by Symfony (e.g. you use ``MYSQL_URL `` instead of ``DATABASE_URL ``)
288
+ then you need to rename all occurrences of those environment variables in your
289
+ Symfony application. A simpler alternative is to use the ``.env.local `` file to
290
+ reassign the environment variables:
291
+
292
+ .. code-block :: bash
293
+
294
+ # .env.local
295
+ DATABASE_URL=${MYSQL_URL}
296
+ # ...
297
+
298
+ Now you can start the containers and all their services will be exposed. Browse
299
+ any page of your application and check the "Symfony Server" section in the web
300
+ debug toolbar. You'll see that "Docker Compose" is "Up".
301
+
302
+ SymfonyCloud Integration
303
+ ------------------------
304
+
305
+ The local Symfony server provides full, but optional, integration with
306
+ `SymfonyCloud `_, a service optimized to run your Symfony applications on the
307
+ cloud. It provides features such as creating environments, backups/snapshots,
308
+ and even access to a copy of the production data from your local machine to help
309
+ debug any issues.
310
+
311
+ `Read SymfonyCloud technical docs `_.
312
+
247
313
Bonus Features
248
314
--------------
249
315
@@ -282,18 +348,8 @@ commands from the Symfony server:
282
348
# creates a new project based on the Symfony Demo application
283
349
$ symfony new --demo my_project_name
284
350
285
- SymfonyCloud Integration
286
- ------------------------
287
-
288
- The local Symfony server provides full, but optional, integration with
289
- `SymfonyCloud `_, a service optimized to run your Symfony applications on the
290
- cloud. It provides features such as creating environments, backups/snapshots,
291
- and even access to a copy of the production data from your local machine to help
292
- debug any issues.
293
-
294
- `Read SymfonyCloud technical docs `_.
295
-
296
351
.. _`symfony.com/download` : https://symfony.com/download
297
352
.. _`different ways of installing Symfony` : https://symfony.com/download
353
+ .. _`Docker` : https://en.wikipedia.org/wiki/Docker_(software)
298
354
.. _`SymfonyCloud` : https://symfony.com/cloud/
299
355
.. _`Read SymfonyCloud technical docs` : https://symfony.com/doc/master/cloud/intro.html
0 commit comments