From d2eb0c4323153a3929947c0c8f2f752c69a4a7c0 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Mon, 21 Sep 2026 18:51:32 +0200 Subject: [PATCH] docs: document the scheduler that now runs in the container Nothing here ever mentioned scheduling, and no image ran a scheduler, so every install created recurring invoices never, flagged nothing overdue and expired no estimates. The application images now supervise the scheduler themselves. Documents that, tells anyone whose recurring invoices never appeared to pull a current image, and names SCHEDULER_ENABLED for people who drive the schedule from a separate container or run more than one replica. --- README.md | 14 ++++++++++++++ docker-compose.mysql.yml | 7 +++++++ docker-compose.pgsql.yml | 7 +++++++ docker-compose.sqlite.yml | 14 ++++++++++++++ 4 files changed, 42 insertions(+) diff --git a/README.md b/README.md index 02b6a63..89b41e6 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,20 @@ docker run -d \ This will start the InvoiceShelf instance on port 8090. The data will be persisted in ./invoiceshelf/storage for the `storage` directory and `./invoiceshelf/database` for the SQLite database. +## Scheduled work + +The container runs Laravel's scheduler itself, supervised alongside the web +server. That is what creates recurring invoices, flags invoices overdue and +expires estimates, so there is nothing to add to the host's crontab. + +Images published before this was added ran no scheduler at all. If recurring +invoices have never appeared on your install, pull a current image. + +Set `SCHEDULER_ENABLED=false` only if you drive the schedule from elsewhere, +for example a second container started with +`command: ["php", "/var/www/html/artisan", "schedule:work"]`, or if you run more +than one replica and want exactly one of them scheduling. + ## Advanced configuration InvoiceShelf images are built on top of the `serversideup/php` image. diff --git a/docker-compose.mysql.yml b/docker-compose.mysql.yml index f60edeb..73c77d2 100644 --- a/docker-compose.mysql.yml +++ b/docker-compose.mysql.yml @@ -52,6 +52,13 @@ services: # REF: https://github.com/InvoiceShelf/InvoiceShelf/issues/213#issuecomment-3026790543 - SANCTUM_STATEFUL_DOMAINS=localhost:8090 + # The container runs Laravel's scheduler itself, which is what creates + # recurring invoices, flags invoices overdue and expires estimates. Set + # this to false only if you drive the schedule from elsewhere, such as a + # second container running `php artisan schedule:work`, or if you run + # more than one replica and want exactly one of them scheduling. + # - SCHEDULER_ENABLED=true + - DB_CONNECTION=mariadb - DB_HOST=database - DB_PORT=3306 diff --git a/docker-compose.pgsql.yml b/docker-compose.pgsql.yml index 8b646af..77563c2 100644 --- a/docker-compose.pgsql.yml +++ b/docker-compose.pgsql.yml @@ -47,6 +47,13 @@ services: # REF: https://github.com/InvoiceShelf/InvoiceShelf/issues/213#issuecomment-3026790543 - SANCTUM_STATEFUL_DOMAINS=localhost:8090 + # The container runs Laravel's scheduler itself, which is what creates + # recurring invoices, flags invoices overdue and expires estimates. Set + # this to false only if you drive the schedule from elsewhere, such as a + # second container running `php artisan schedule:work`, or if you run + # more than one replica and want exactly one of them scheduling. + # - SCHEDULER_ENABLED=true + - DB_CONNECTION=pgsql - DB_HOST=database - DB_PORT=5432 diff --git a/docker-compose.sqlite.yml b/docker-compose.sqlite.yml index ac6f6f0..b541816 100644 --- a/docker-compose.sqlite.yml +++ b/docker-compose.sqlite.yml @@ -41,6 +41,20 @@ services: # REF: https://github.com/InvoiceShelf/InvoiceShelf/issues/213#issuecomment-3026790543 - SANCTUM_STATEFUL_DOMAINS=localhost:8090 + # The container runs Laravel's scheduler itself, which is what creates + # recurring invoices, flags invoices overdue and expires estimates. Set + # this to false only if you drive the schedule from elsewhere, such as a + # second container running `php artisan schedule:work`, or if you run + # more than one replica and want exactly one of them scheduling. + # - SCHEDULER_ENABLED=true + + # The container runs Laravel's scheduler itself, which is what creates + # recurring invoices, flags invoices overdue and expires estimates. Set + # this to false only if you drive the schedule from elsewhere, such as a + # second container running `php artisan schedule:work`, or if you run + # more than one replica and want exactly one of them scheduling. + # - SCHEDULER_ENABLED=true + - DB_CONNECTION=sqlite - DB_DATABASE=/var/www/html/storage/app/database.sqlite # ❌️📝 PLEASE DON'T EDIT THIS LINE - unless you know what you are doing - CACHE_STORE=file