Issues with Docker Compose

Your software
My Mautic version is: mautic/mautic:5-apache
My PHP version is: php:8.1-apache
My Database type and version is: mysql:8.0

Your problem
My problem is:

I’m using the docker compose file from docker-mautic/examples/basic/docker-compose.yml at 6ebb1d6a2751fbb029d1e5ebb6c9ae076f55d47f · mautic/docker-mautic · GitHub

The DB and WEB portions start properly but the WORKER is giving the following output in the terminal.

These errors are showing in the log:

mautic_worker | 2024-02-18 23:37:31,560 INFO spawned: ‘messenger-consume-hit_00’ with pid 429
mautic_worker |
mautic_worker | 2024-02-18 23:37:31,562 INFO success: messenger-consume-hit_00 entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mautic_worker | // The worker will automatically exit once it has received a stop signal via
mautic_worker | // the messenger:stop-workers command.
mautic_worker |
mautic_worker | // Quit the worker with CONTROL-C.
mautic_worker |
mautic_worker | // Re-run the command with a -vv option to see logs about consumed messages.
mautic_worker |
mautic_worker |
mautic_worker | In SyncTransport.php line 37:
mautic_worker |
mautic_worker | You cannot receive messages from the Messenger SyncTransport.
mautic_worker |
mautic_worker |
mautic_worker | messenger:consume [-l|–limit LIMIT] [-f|–failure-limit FAILURE-LIMIT] [-m|–memory-limit MEMORY-LIMIT] [-t|–time-limit TIME-LIMIT] [–sleep SLEEP] [-b|–bus BUS] [–queues QUEUES] [–no-reset] [–] […]
mautic_worker |

Steps I have tried to fix the problem:
NONE, I don’t know what should be tried.

Until you do not set redis or some other transport to handle async message you cannot really run the messenger consume command.

You should make sure that you have async transport available, tell mautic about the async transport and only then run the consumer.

Just getting back to this. Can you give me a guide on how to accomplish the changes to the docker compose file I linked to in the OP.

In the same repo you have a couple variables you set in order to run workers to consume messages:

I would imagine all the required packages are already installed with docker image.

However before I would set and run the workers I would make sure that the right config is set in mautic app.

I have not used this image yet so I do not know the specific, but basically you will have to use docker service name in mautic async. settings.