Skip to content

Add paragraph about symfony-cli workers #17405

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
Nov 3, 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
25 changes: 25 additions & 0 deletions setup/symfony_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,31 @@ 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
-------------------

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

.. code-block:: yaml

# .symfony.local.yaml
workers:
# pre-defined command to build and watch front-end assets
# yarn_encore_watch:
# cmd: ['yarn', 'encore', 'dev', '--watch']
yarn_encore_watch: ~

# pre-defined command to start messenger consumer
# messenger_consume_async:
# cmd: ['symfony', 'console', 'messenger:consume', 'async']
# watch: ['config', 'src', 'templates', 'vendor']
messenger_consume_async: ~

# additional commands
spa:
cmd: ['yarn', '--cwd', './spa/', 'dev']

Docker Integration
------------------

Expand Down