Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add supervisor to Dockerfile for process management #322

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docker/Dockerfile_Process
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# * InstallMediaPush: Set this variable to 'true' to enable headless Chrome on the server for recording and streaming web pages back to Ant Media Server.
# --build-arg InstallMediaPush='true'
#
# * Supervisor Configuration (Optional)
# If you want to use Supervisor to manage the Ant Media Server process, you can uncomment the Supervisor-related section in the Dockerfile.
# With this configuration, you can easily restart, stop the service, or run the `enable_ssl.sh` script for Ant Media Server.

FROM ubuntu:22.04

Expand Down Expand Up @@ -92,4 +95,23 @@ RUN if [ "true" = "$InstallMediaPush" ]; then \
# Example usage: ./start.sh -e 60


##################### supervisor configuration ##############################
#RUN apt-get update && apt-get install -y supervisor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run these options with a parameter. You can use --build-arg or runtime parameters which one fits better.

Please add some test deployment scripts to make sure that it's working as expected

#
#RUN echo '[supervisord]\n\
#nodaemon=true\n\
#\n\
#[program:antmedia]\n\
#command=/usr/local/antmedia/start.sh\n\
#autostart=true\n\
#autorestart=true\n\
#user=antmedia\n\
#stdout_logfile_maxbytes = 0\n\
#stderr_logfile_maxbytes = 0\n\
#stdout_logfile=/dev/stdout\n\
#stderr_logfile=/dev/stderr' > /etc/supervisor/supervisord.conf
#
#ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it receiving the runtime parameters(-g, -s, etc.) as start.sh?

##############################################################################

ENTRYPOINT ["/usr/local/antmedia/start.sh"]
Loading