mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
add cron service into docker-compose #16
This commit is contained in:
@@ -21,3 +21,19 @@ web:
|
||||
- app
|
||||
ports:
|
||||
- 80
|
||||
|
||||
cron:
|
||||
image: invoiceninja/invoiceninja
|
||||
links:
|
||||
- db:mysql
|
||||
user: www-data
|
||||
entrypoint: |
|
||||
bash -c 'bash -s <<EOF
|
||||
trap "break;exit" SIGHUP SIGINT SIGTERM
|
||||
sleep 30s
|
||||
while /bin/true; do
|
||||
DB_USERNAME=root DB_PASSWORD=mdp /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
|
||||
DB_USERNAME=root DB_PASSWORD=mdp /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
|
||||
sleep 1d
|
||||
done
|
||||
EOF'
|
||||
|
||||
Reference in New Issue
Block a user