Added cron to owncloud

This commit is contained in:
Przemek Grondek 2017-07-16 22:20:09 +02:00
parent b71ecb4f34
commit c4b4a1a657
3 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ENV OWNCLOUD_VER 10.0.2
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y nginx mysql-server php-fpm php-mysql php-gd php-json php-curl php-intl php-mcrypt php-imagick php-zip php-xml php-mbstring php-smbclient pwgen bzip2 gosu supervisor && \
apt-get install -y nginx mysql-server php-fpm php-mysql php-gd php-json php-curl php-intl php-mcrypt php-imagick php-zip php-xml php-mbstring php-smbclient pwgen bzip2 gosu supervisor cron && \
apt-get clean
# Make required catalogs
@ -34,6 +34,7 @@ RUN rm /var/www/owncloud-${OWNCLOUD_VER}.tar.bz2 \
/var/www/owncloud/.htaccess \
/var/www/owncloud/.user.ini
RUN rmdir /var/www/owncloud
RUN echo "*/15 * * * * www-data php -f /var/www/cron.php" >> /etc/crontab
# Provision data
RUN mkdir -p /provision/owncloud

View File

@ -34,6 +34,7 @@ function first_run() {
--database "mysql" --database-name "owncloud" \
--database-user "owncloud" --database-pass "$SQL_OWNCLOUD_PASSWORD" \
--admin-user "admin" --admin-pass "password"
gosu www-data php occ background:cron
killall mysqld

View File

@ -10,3 +10,6 @@ command=nginx -g "daemon off;"
[program:php-fcgi]
command=php-fpm7.0 -F
[program:cron]
command=cron -f