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:
> source /etc/profile
> /usr/bin/supervisord --nodaemon --configuration /etc/supervisord.conf

When my dockerfile entrypoint is: ENTRYPOINT ["supervisord", "--nodaemon",
"--configuration", "/etc/supervisord.conf"]
supervisord will get the shutdown signal
When my dockerfile entrypoint is: ENTRYPOINT ["/start-supervisord.sh"]
supervisord will not get the shutdown signal

The start script works fine for setting the variables that my processes
need. I just need the shutdown signals to get to supervisord. Thanks in
advance for any help. I appreciate it.
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to