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