[Supervisor-users] supervisord start from custom init script doesn't get shutdown signal
I am building a dockerfile that uses supervisord to manage a couple of processes. I have a simple init script that is my dockerfile entrypoint that does some stuff and then starts supervisord. When I set the dockerfile entrypoint to supervisord, then supervisord will get the shutdown signal when I stop the container. When I set the dockerfile entrypoint to my script, supervisord will not get the shutdown signal. I think I need help with how to create that script such that supervisord gets the shutdown signal... I think.
Here's a bit more context that might help. I need some environment variables that are dynamically determined via a script that gathers some external environmental information. I need these environment variables to be available to the processes that supervisord manages. From reading various suggestions online, the best approach is to create a start script that sets the environment variables and then starts supervsord. I put my environment scripts in /etc/profile and source that. My start script has two lines in it: