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 ------------------