diff --git a/Makefile b/Makefile index 44719a0..18a9c3c 100644 --- a/Makefile +++ b/Makefile @@ -43,22 +43,22 @@ wiki-pull: wiki: wiki-clean wiki-build wiki-push # ----------------------------------------------------------------------------- -# nextcloud-cron +# nextcloud # ----------------------------------------------------------------------------- -nextcloud-cron-clean: - docker rmi $(DOCKER_REGISTRY)/nextcloud-cron || /bin/true +nextcloud-clean: + docker rmi $(DOCKER_REGISTRY)/nextcloud || /bin/true -nextcloud-cron-build: - docker-compose build nextcloud-cron +nextcloud-build: + docker-compose build nextcloud-app -nextcloud-cron-push: - docker-compose push nextcloud-cron +nextcloud-push: + docker-compose push nextcloud-app -nextcloud-cron-pull: - docker-compose pull nextcloud-cron +nextcloud-pull: + docker-compose pull nextcloud-app -nextcloud-cron: nextcloud-cron-clean nextcloud-cron-build nextcloud-cron-push +nextcloud: nextcloud-clean nextcloud-build nextcloud-push # ----------------------------------------------------------------------------- # proxy @@ -182,7 +182,7 @@ clean-all: clean-builds: \ wiki-clean \ - nextcloud-cron-clean \ + nextcloud-clean \ proxy-clean \ certbot-clean \ runner-base-clean \ diff --git a/docker-compose.yml b/docker-compose.yml index a62478f..5c1c903 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,21 +57,14 @@ services: nextcloud-app: container_name: nextcloud-app - image: nextcloud:fpm + build: nextcloud + image: registry.wojciechkozlowski.eu/wojtek/loki/nextcloud links: - nextcloud-db volumes: - nextcloud:/var/www/html restart: always - nextcloud-cron: - container_name: nextcloud-cron - build: nextcloud/cron - image: registry.wojciechkozlowski.eu/wojtek/loki/nextcloud-cron - volumes_from: - - nextcloud-app - restart: always - nextcloud: container_name: nextcloud image: nginx diff --git a/nextcloud/cron/Dockerfile b/nextcloud/Dockerfile similarity index 50% rename from nextcloud/cron/Dockerfile rename to nextcloud/Dockerfile index fe91b6a..a8002c3 100644 --- a/nextcloud/cron/Dockerfile +++ b/nextcloud/Dockerfile @@ -3,14 +3,10 @@ FROM nextcloud:fpm ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get -y upgrade -RUN apt-get -y install \ - supervisor \ - cron +RUN apt-get -y install supervisor RUN rm -rf /var/lib/apt/lists/* - -RUN mkdir /var/log/supervisord /var/run/supervisord && \ - echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - +RUN mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/nextcloud/cron/supervisord.conf b/nextcloud/supervisord.conf similarity index 97% rename from nextcloud/cron/supervisord.conf rename to nextcloud/supervisord.conf index ff27295..4f76259 100644 --- a/nextcloud/cron/supervisord.conf +++ b/nextcloud/supervisord.conf @@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=cron -f +command=/cron.sh