Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahmeda's avatar

Queue with AWS EB & Laravel

I just follow this blog post to install Supervisor on AWS EB with Laravel, as we know there is two way to put environment variables in the project:

- Put all environment variables directly on AWS EB from the config
- upload .env file with the project files

the wired thing when following the first way then installs the Supervisor the queue does not process!

But the second way which uploads the .env file the queue process perfectly!

Note: the environment variables are the same whether in the first or second way!

What am I missing?

0 likes
1 reply
fideloper's avatar

Hi!

In the case of the first not working, supervisord must be starting the process in a way that does not allow the processes (the queue:listen or queue:work command in this case) to inherit the environment variables, so the code base never sees them.

The solution to that seems a bit difficult vs using a .env file - depending on the flavor of OS you use, the env vars are placed in a file on the server that can be sourced: https://stackoverflow.com/questions/63280543/aws-eb-deploy-doesnt-load-environment-variables

1 like

Please or to participate in this conversation.