diff --git a/Dockerfile b/Dockerfile index cda032e..89a5def 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,8 +64,11 @@ COPY default.nginx /etc/nginx/sites-available/default RUN ln -s /usr/local/share/doc/epple2 /usr/share/nginx/html/epple2 # supervisor -CMD ["supervisord"] -COPY supervisord.conf /etc/supervisor/conf.d/ +RUN rm -R /etc/supervisor/* +ENTRYPOINT ["supervisord"] +CMD ["-c", "both"] +COPY supervisor/includes /etc/supervisor/ +COPY supervisor/commands ./ ENV DISPLAY :0 ENV SDL_VIDEODRIVER x11 diff --git a/supervisor/commands/app b/supervisor/commands/app new file mode 100644 index 0000000..187d426 --- /dev/null +++ b/supervisor/commands/app @@ -0,0 +1,5 @@ +[supervisord] +nodaemon=true + +[include] +files=/etc/supervisor/epple2.supervisor diff --git a/supervisor/commands/both b/supervisor/commands/both new file mode 100644 index 0000000..1e5eafa --- /dev/null +++ b/supervisor/commands/both @@ -0,0 +1,5 @@ +[supervisord] +nodaemon=true + +[include] +files=/etc/supervisor/web.supervisor /etc/supervisor/epple2.supervisor diff --git a/supervisor/commands/web b/supervisor/commands/web new file mode 100644 index 0000000..1ba531f --- /dev/null +++ b/supervisor/commands/web @@ -0,0 +1,5 @@ +[supervisord] +nodaemon=true + +[include] +files=/etc/supervisor/web.supervisor diff --git a/supervisord.conf b/supervisor/includes/epple2.supervisor similarity index 70% rename from supervisord.conf rename to supervisor/includes/epple2.supervisor index f026653..526069d 100644 --- a/supervisord.conf +++ b/supervisor/includes/epple2.supervisor @@ -1,6 +1,3 @@ -[supervisord] -nodaemon=true - [program:Xvfb] command=Xvfb -screen 0 640x480x24 -ac stdout_logfile=/dev/stdout @@ -13,12 +10,6 @@ stdout_logfile=/dev/stdout redirect_stderr=true stdout_logfile_maxbytes=0 -[program:nginx] -command=nginx -g "daemon off;" -stdout_logfile=/dev/stdout -redirect_stderr=true -stdout_logfile_maxbytes=0 - [program:epple2] command=epple2 stdout_logfile=/dev/stdout diff --git a/supervisor/includes/web.supervisor b/supervisor/includes/web.supervisor new file mode 100644 index 0000000..8ff3cfe --- /dev/null +++ b/supervisor/includes/web.supervisor @@ -0,0 +1,5 @@ +[program:nginx] +command=nginx -g "daemon off;" +stdout_logfile=/dev/stdout +redirect_stderr=true +stdout_logfile_maxbytes=0