Squash nextcloud containers

This commit is contained in:
Wojciech Kozlowski 2018-12-11 21:11:50 +00:00
parent 4841899dc7
commit 664d3e3431
4 changed files with 16 additions and 27 deletions

View File

@ -43,22 +43,22 @@ wiki-pull:
wiki: wiki-clean wiki-build wiki-push wiki: wiki-clean wiki-build wiki-push
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# nextcloud-cron # nextcloud
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
nextcloud-cron-clean: nextcloud-clean:
docker rmi $(DOCKER_REGISTRY)/nextcloud-cron || /bin/true docker rmi $(DOCKER_REGISTRY)/nextcloud || /bin/true
nextcloud-cron-build: nextcloud-build:
docker-compose build nextcloud-cron docker-compose build nextcloud-app
nextcloud-cron-push: nextcloud-push:
docker-compose push nextcloud-cron docker-compose push nextcloud-app
nextcloud-cron-pull: nextcloud-pull:
docker-compose pull nextcloud-cron docker-compose pull nextcloud-app
nextcloud-cron: nextcloud-cron-clean nextcloud-cron-build nextcloud-cron-push nextcloud: nextcloud-clean nextcloud-build nextcloud-push
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# proxy # proxy
@ -182,7 +182,7 @@ clean-all:
clean-builds: \ clean-builds: \
wiki-clean \ wiki-clean \
nextcloud-cron-clean \ nextcloud-clean \
proxy-clean \ proxy-clean \
certbot-clean \ certbot-clean \
runner-base-clean \ runner-base-clean \

View File

@ -57,21 +57,14 @@ services:
nextcloud-app: nextcloud-app:
container_name: nextcloud-app container_name: nextcloud-app
image: nextcloud:fpm build: nextcloud
image: registry.wojciechkozlowski.eu/wojtek/loki/nextcloud
links: links:
- nextcloud-db - nextcloud-db
volumes: volumes:
- nextcloud:/var/www/html - nextcloud:/var/www/html
restart: always 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: nextcloud:
container_name: nextcloud container_name: nextcloud
image: nginx image: nginx

View File

@ -3,14 +3,10 @@ FROM nextcloud:fpm
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y upgrade RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install \ RUN apt-get -y install supervisor
supervisor \
cron
RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/lib/apt/lists/*
RUN mkdir /var/log/supervisord /var/run/supervisord
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 -
COPY supervisord.conf /etc/supervisor/supervisord.conf COPY supervisord.conf /etc/supervisor/supervisord.conf

View File

@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
command=cron -f command=/cron.sh