diff --git a/Dockerfile b/Dockerfile index e9fdcaf..47d59ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -FROM nextcloud:22.1.0 +FROM nextcloud:22.1.0-apache COPY httpd/000-default.conf /etc/apache2/sites-available/000-default.conf +COPY supervisord/supervisord.conf /opt/supervisord.conf # install cron -RUN apt-get update && \ - apt-get install -y cron libmagickcore-6.q16-6-extra && \ - rm -rf /var/lib/apt/lists/* \ No newline at end of file +RUN apt-get update \ + && apt-get install -y supervisor libmagickcore-6.q16-6-extra \ + && mkdir /var/log/supervisord /var/run/supervisord \ + && rm -rf /var/lib/apt/lists/* + +CMD ["/usr/bin/supervisord", "-c", "/opt/supervisord.conf"] \ No newline at end of file diff --git a/supervisord/supervisord.conf b/supervisord/supervisord.conf new file mode 100644 index 0000000..093245d --- /dev/null +++ b/supervisord/supervisord.conf @@ -0,0 +1,23 @@ +[supervisord] +nodaemon=true +user=root +logfile=/var/log/supervisord/supervisord.log +pidfile=/var/run/supervisord/supervisord.pid +childlogdir=/var/log/supervisord/ +logfile_maxbytes=50MB +logfile_backups=3 +loglevel=error + +[program:apache2] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=apache2-foreground + +[program:cron] +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 +command=/cron.sh \ No newline at end of file