crater-invoice/crater

Recurring invoices not made on docker

CountOlaf87 opened this issue · 4 comments

Describe the bug
I'm trying to send recurring invoices, but they don't seem to be made. I looked at the documentation, but it says for docker that I shouldn't add cron? I'm running 6.0.6 on docker-compose

Expected behavior
Recurring invoices should be made and sent to my customer

Screenshots
image

Please complete the following information:

  • Crater version: 6.0.6
  • PHP version: ?
  • Database type and version: ?

Optional info

  • OS: Ubuntu 20.04 - docker 20.10.17
  • Browser: chrome
c-nv-s commented

not sure if this helps you but if you are using a postgres database with crafter then you also have to amend the ./docker-compose/cron.dockerfile to include installing libpq-dev and install the php extension pdo_pgsql like this:

FROM php:8.0-fpm-alpine

RUN apk add --no-cache \
    php8-bcmath libpq-dev

RUN docker-php-ext-install pdo pdo_mysql bcmath pdo_pgsql

COPY docker-compose/crontab /etc/crontabs/root

CMD ["crond", "-f"]

I had the issue that that the recurring jobs were not being processed because when I checked the logs of the cron container docker logs crater_cron_1(or whatever yours container is called) it was showing an error along the lines that the sql driver was not working properly.

I installed it the way it is mentioned here on Github, it's using a mariadb database and no cron container is being spun up...

Is there maybe a workaround for this?

I have the same issue and would appreciate a solution.