From c3d877a76cbc223439993ee51ddd5f2cd07c7014 Mon Sep 17 00:00:00 2001 From: Alexander Schwenn Date: Mon, 31 Oct 2022 17:54:57 +0100 Subject: [PATCH] Add paragraph about symfony-cli workers --- setup/symfony_server.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/setup/symfony_server.rst b/setup/symfony_server.rst index 9dbda5f31de..e06d6315aaf 100644 --- a/setup/symfony_server.rst +++ b/setup/symfony_server.rst @@ -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 ------------------