Skip to content

Commit

Permalink
Merge pull request #334 from ant-media/revert-322-add-supervisor-support
Browse files Browse the repository at this point in the history
Revert "Add supervisor to Dockerfile for process management"
  • Loading branch information
mekya authored Jan 19, 2025
2 parents 0edfe8e + 3a7f335 commit e9c4bd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 113 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/docker-test-supervisor.yml

This file was deleted.

28 changes: 2 additions & 26 deletions docker/Dockerfile_Process
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,14 @@
# * 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 enable as follows. With this configuration, you can easily restart, stop the service, or run the `enable_ssl.sh` script for Ant Media Server.
# --build-arg UseSupervisor='true'
#

FROM ubuntu:22.04

ARG AntMediaServer
ARG LicenseKey
ARG InstallMediaPush
ARG UseSupervisor=false
ARG BranchName=master

ENV UseSupervisor=${UseSupervisor}
ARG BranchName=master

#Running update and install makes the builder not to use cache which resolves some updates
RUN apt-get update && apt-get install -y curl wget iproute2 cron logrotate dnsutils iptables
Expand Down Expand Up @@ -97,23 +92,4 @@ RUN if [ "true" = "$InstallMediaPush" ]; then \
# Example usage: ./start.sh -e 60


##################### supervisor configuration ##############################
RUN if [ "true" = "$UseSupervisor" ]; then \
apt-get update && apt-get install -y supervisor && \
echo '[supervisord]\n\
nodaemon=true\n\
\n\
[program:antmedia]\n\
command=/bin/bash -c "/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; \
fi

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

ENTRYPOINT [ "sh", "-c", "if [ \"$UseSupervisor\" = \"true\" ]; then exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; else exec /usr/local/antmedia/start.sh; fi" ]
ENTRYPOINT ["/usr/local/antmedia/start.sh"]

0 comments on commit e9c4bd9

Please sign in to comment.