Starting point configuration for running (PHP) workers inside Docker containers with Supervisor and Supervisorctl to manage them.
- PHP-CLI based Docker image with Supervisor installed: located in
docker/php/Dockerfile
. - Supervisor global configuration: located in
docker/php/conf/supervisord.conf
. - Supervisor programs configuration: located in
docker/php/conf/supervisord-programs.conf
.
$ docker-compose build --pull
$ docker-compose up --build
$ docker-compose exec php_worker supervisorctl status
$ docker-compose exec php_worker supervisorctl stop all
$ docker-compose exec php_worker supervisorctl start all
$ docker-compose exec php_worker supervisorctl restart all
$ docker-compose stop
$ docker-compose down --volumes --remove-orphans