sebb
sebb

Reputation: 1966

Magento 2 Docker Crontab and system upgrade

I've got Magento 2 which I wrapped arround docker-compose. Following design patterns I am using one service for one task. So at this moment I have:

Cron is running properly, my tasks are visible and finishing correctly.

Here comes the quesion: does cron need access to magento files ?

When I try to enter System -> Web Setup Wizard -> System Upgrade I've got errors saying my cron is not working correctly. So my only option to upgrade Magento to new version is to do it by manually chaning files and rebuilding image ?

Upvotes: 0

Views: 778

Answers (1)

rattybag
rattybag

Reputation: 421

Yes your cron will need access to your Magento files, I am assuming there is a PHP script that gets ran by cron like many other frameworks.

What I have done previously is ran cron from the host container like this:

5 4 * * * docker exec -it magento exec php /var/www/cron.php

Upvotes: 0

Related Questions