mhubig / docker-partkeepr

mhubig/partkeepr docker image repository
62 stars 64 forks source link

cron missing? #21

Closed Raigedas closed 4 years ago

Raigedas commented 5 years ago

hi, at the end of the setup the partkeepr tells to add this to crontab: 0 0,6,12,18 * /usr/bin/php /var/www/html/app/console partkeepr:cron:run

neither README.md nor Dockerfile has any mentions of cron. is that not mandatory for partkeepr to function correctly?

i could create/append the row to /etc/crontab file but i am afraid it will be ignored because docker container just runs apache2 as the single process. am i wrong?

ghost commented 4 years ago

This is correct, cron won't run. One way to go about it is to create another container with the same image as apache, including PHP cli, and run cron as entrypoint with the added crontab, mounting the same volumes as you do in the partkeepr image with the application and its data.

I don't know how mature docker support is for Partkeepr but I saw your issue looking into running Partkeepr in a container myself.

dromer commented 4 years ago

docker support in partkeepr is still very much under investigation. see https://github.com/partkeepr/PartKeepr/pull/1088

There are a lot of moving parts and docker is not exactly suited for the task, but certainly a working compose setup should be possible.