From 00103f46c6eba85d50c9f832b584058b5eb04f82 Mon Sep 17 00:00:00 2001 From: Corey Gaspard Date: Sun, 9 Jul 2017 23:26:17 -0500 Subject: [PATCH] Supervisord to run webui, and cron both --- Dockerfile | 7 +++++-- supervisord.conf | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 supervisord.conf diff --git a/Dockerfile b/Dockerfile index 7d73dd5..2fd14b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,10 @@ LABEL description "Crontab-UI docker" RUN apk --no-cache add \ nodejs \ wget \ - curl + curl \ + supervisor + +COPY supervisord.conf /etc/supervisord.conf RUN npm install -g crontab-ui @@ -17,4 +20,4 @@ ENV PORT 8000 EXPOSE $PORT -CMD ["crontab-ui"] +CMD ["supervisord", "-c", "/etc/supervisord.conf"] diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..93197bd --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,12 @@ +[supervisord] +nodaemon=true + +[program:crontab] +command=crond -l 2 -f +stderr_logfile = /var/log/crontab-stderr.log +stdout_logfile = /var/log/crontab-stdout.log + +[program:crontabui] +command=crontab-ui +stderr_logfile = /var/log/crontabui-stderr.log +stdout_logfile = /var/log/crontabui-stdout.log \ No newline at end of file