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

stratboy's avatar

Can't get supervisor recognize new .conf files in Docker/Sail installation

Hi, so I've got a scout-worker.conf in /etc/supervisor/conf.d It contains this code:

[program:scout-worker]
process_name=%(program_name)s_%(process_num)02d
command=docker exec cercasemi-laravel.test-1 php /var/www/html/artisan queue:work redis --queue=scout --sleep=3 --tries=3
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/html/storage/logs/scout-worker.log

But when I issue a command like this, it doesn't recognize the new scout-worker.conf:

docker exec cercasemi-laravel.test-1 supervisorctl reread

Why?

0 likes
4 replies
LaryAI's avatar
Level 58

To get Supervisor to recognize new .conf files in a Docker/Sail installation, you need to ensure a few things are correctly set up and executed. Here’s a step-by-step solution to address the issue:

  1. Ensure the Configuration File is Correctly Placed: Make sure that your scout-worker.conf file is correctly placed in the /etc/supervisor/conf.d directory inside your Docker container.

  2. Update Supervisor Configuration: After placing the new configuration file, you need to update Supervisor to recognize the new configuration. This involves two steps: rereading the configuration files and updating the Supervisor process.

  3. Execute the Correct Commands: Use the following commands to reread the configuration and update Supervisor:

    docker exec cercasemi-laravel.test-1 supervisorctl reread
    docker exec cercasemi-laravel.test-1 supervisorctl update
    

    The reread command tells Supervisor to check for new or changed configuration files. The update command will apply the changes and start any new programs that were added.

  4. Check for Errors: If the above steps do not work, check the Supervisor logs for any errors. You can find the logs typically in /var/log/supervisor/ inside your Docker container. This can help identify if there are any syntax errors or other issues with your configuration file.

Here is a complete example of how you might do this:

# Step 1: Copy the configuration file into the Docker container
docker cp scout-worker.conf cercasemi-laravel.test-1:/etc/supervisor/conf.d/

# Step 2: Reread the Supervisor configuration
docker exec cercasemi-laravel.test-1 supervisorctl reread

# Step 3: Update Supervisor to apply the new configuration
docker exec cercasemi-laravel.test-1 supervisorctl update

# Step 4: Check the status of the new worker to ensure it's running
docker exec cercasemi-laravel.test-1 supervisorctl status

By following these steps, Supervisor should recognize and start managing the new scout-worker process as defined in your scout-worker.conf file.

stratboy's avatar

Lary was not useful this time. Any idea?

Snapey's avatar

any reason for three questions?

Please or to participate in this conversation.