Use wp-cli to execute cron

This commit is contained in:
xZero707 2021-03-19 13:02:28 +01:00
parent db04d0acf1
commit 0087b332ea

View File

@ -43,7 +43,7 @@ ENV CRON_ENABLED true
ENV VIRTUAL_HOST your-domain.com
ADD rootfs /
RUN echo "* * * * * /usr/local/bin/php /var/www/${WEB_ROOT}/wp-cron.php" >> /etc/crontabs/www-data \
RUN echo "* * * * * /usr/local/bin/wp cron event run --due-now" >> /etc/crontabs/www-data \
&& chmod a+x /usr/local/bin/wp
VOLUME ["/root/.wp-cli", "/var/www/${WEB_ROOT}", "/var/www/${WEB_ROOT}/wp-content"]