Skip to content

Symfony CLI: document the .symfony.local.yaml config file #17562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,46 @@ server provides a ``run`` command to wrap them as follows:
# stop the web server (and all the associated commands) when you are finished
$ symfony server:stop

Configuring Workers
-------------------
Configuration file
------------------

.. caution::

This feature is experimental and could change or be removed at any time
without prior notice.

There are several options that you can set using a ``.symfony.local.yaml`` config file:

.. code-block:: yaml

# Sets domain1.wip and domain2.wip for the current project
proxy:
domains:
- domain1
- domain2
Comment on lines +299 to +303
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this should not be moved to the proxy section 🤔.
Basically pin every part of the YAML to its dedicated feature section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to move it if it's really wanted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After thinking about this, I think it's better for now to keep all options of the config file in the same section, because it's not very long. In any case, if we realize that this is not working well, we can quickly update this in a future PR to do what @tucksaun suggested.


http:
document_root: public/ # Path to the project document root
passthru: index.php # Project passthru index
port: 8000 # Force the port that will be used to run the server
preferred_port: 8001 # Preferred HTTP port [default: 8000]
p12: path/to/p12_cert # Name of the file containing the TLS certificate to use in p12 format
allow_http: true # Prevent auto-redirection from HTTP to HTTPS
no_tls: true # Use HTTP instead of HTTPS
daemon: true # Run the server in the background
use_gzip: true # Toggle GZIP compression

.. caution::

Setting domains in this configuration file will override any domains you set
using the ``proxy:domain:attach`` command for the current project when you start
the server.

Configuring Workers
~~~~~~~~~~~~~~~~~~~

If you like some processes to start automatically, along with the webserver
(``symfony server:start``), add a configuration file to your project:
(``symfony server:start``), you can set them in the YAML configuration file:

.. code-block:: yaml

Expand Down