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