Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down