Job Control/background process (using ampersand) in .ebextensions config commands
Solution 1:
In order to make this work I had to run the command from a file using the post deployment hooks
commands:
create_post_dir:
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/99_restart_workers.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
nohup php /var/app/current/artisan queue:work --daemon >/dev/null 2>&1 &