Comments (11)
ok so setting the environment vars through the docker-compose.yml file works:
eg
environment:
APP_DEBUG: 1
DB_USERNAME: dbusername
DB_PASSWORD: dbpassword
MAIL_DRIVER: mailgun
MAIL_USERNAME: [email protected]
MAIL_FROM_ADDRESS: [email protected]
MAIL_FROM_NAME: 'Strato Technology'
MAILGUN_DOMAIN: mg.mydomain.com
MAILGUN_SECRET: key-mysecretkey
from dockerfiles.
this is a good news, I have to update the doc and the example
from dockerfiles.
Running the commands manually in the container work as well:
www-data@8d4e982a6ad5:~/app$ DB_USERNAME=root DB_PASSWORD=pwd /usr/local/bin/php /var/www/app/artisan ninja:send-reminders
2017-01-20 Running SendReminders...
1 accounts found
Strato Technology | DevOps as a Service: 0 invoices found
Done
www-data@8d4e982a6ad5:~/app$ DB_USERNAME=root DB_PASSWORD=pwd /usr/local/bin/php /var/www/app/artisan ninja:send-invoices
2017-01-20 Running SendRecurringInvoices...
2 recurring invoice(s) found
Processing Invoice 2 - Should send NO
Processing Invoice 3 - Should send NO
0 due recurring invoice instance(s) found
Done
from dockerfiles.
The logs indicate the following only
[2017-01-09 13:06:12] production.ERROR: Cache for currencies is not set {"context":"PHP","user_id":0,"account_id":0,"user_name":"","method":"GET","url":"http://localhost","user_agent":"","ip":"127.0.0.1","count":1} []
[2017-01-09 13:06:12] production.ERROR: ErrorException: Trying to get property of non-object in /var/www/app/app/Libraries/Utils.php:393 Stack trace: #0 /var/www/app/app/Libraries/Utils.php(393): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Trying to get p...', '/var/www/app/ap...', 393, Array) #1 /var/www/app/app/Models/Account.php(488): App\Libraries\Utils::formatMoney(225, 4, false, 'symbol') #2 /var/www/app/app/Services/TemplateService.php(51): App\Models\Account->formatMoney('225.00', Object(App\Models\Client)) #3 /var/www/app/app/Ninja/Mailers/ContactMailer.php(191): App\Services\TemplateService->processVariables('<div>$client,</...', Array) #4 /var/www/app/app/Ninja/Mailers/ContactMailer.php(110): App\Ninja\Mailers\ContactMailer->sendInvitation(Object(App\Models\Invitation), Object(App\Models\Invoice), '<div>$client,</...', 'Reminder: Invoi...', false, Array) #5 /var/www/app/app/Console/Commands/SendReminders.php(74): App\Ninja\Mailers\ContactMailer->sendInvoice(Object(App\Models\Invoice), 'reminder2') #6 [internal function]: App\Console\Commands\SendReminders->fire() #7 /var/www/app/bootstrap/cache/compiled.php(1257): call_user_func_array(Array, Array) #8 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(169): Illuminate\Container\Container->call(Array) #9 /var/www/app/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/app/vendor/symfony/console/Application.php(794): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/app/vendor/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\SendReminders), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/app/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 {main} [] []
It could be that the cache is not being created? Im not sure, I will see what I can find out
from dockerfiles.
I am having the same issue.
from dockerfiles.
I'm having the same issue too.
from dockerfiles.
I think the issue comme from the .env
is not shared, can you try by adding email setting in your docker compose env https://github.com/invoiceninja/invoiceninja/blob/master/.env.example ?
from dockerfiles.
I was just about say :).
The cron container doesnt have the .env file
Cron container:
www-data@ccef0ffe4b60:~/app$ ls -al | grep env
-rw-rw-r-- 1 www-data www-data 1934 Jan 30 12:40 .env.example
The App container:
root@39fca6164cb5:/var/www/app# ls -al | grep env
-rw-r--r-- 1 www-data www-data 4020 Feb 3 13:37 .env
-rw-rw-r-- 1 www-data www-data 1934 Jan 30 12:40 .env.example
Inside the .env file on the app container, I can see my mailgun settings:
root@39fca6164cb5:/var/www/app# cat .env | grep MAILGUN
MAILGUN_DOMAIN=mg.mydomain.com
MAILGUN_SECRET=key-somesecretapikeyhere
I will update my PR to resolve this
from dockerfiles.
Can you just give a try to set this env variable via the docker env mecanism ?
from dockerfiles.
here it's 771f647
from dockerfiles.
For others who are receiving this same error: Another potential cause is that you haven't set up your volumes, or you haven't shared your invoiceninja container's volumes with your invoiceninja-cron container.
from dockerfiles.
Related Issues (20)
- Grey screen after successful setup
- XMLHttpRequest error when requesting PDF files - after migrating between servers HOT 3
- QUEUE_CONNECTION configuration in Docker - can't find clear answer. HOT 1
- not opening login page
- Unable to view / print / download PDF invoices in docker HOT 11
- [BUG] Docker selfhosted bug HOT 8
- Connection reset by peer error with docker install HOT 2
- Raspberry Pi DB Error HOT 4
- dockerhub page says port 80 is opened, but it's port 9000 fcgi that is opened HOT 11
- Docker in k8s, testing, slow initial page load (including page refresh) HOT 15
- Tax line item not displaying in Totals area of invoice HOT 2
- after upgrade empty white page HOT 2
- Blank screen after upgrade HOT 5
- Permissions Error with Lost+Found Directory HOT 2
- git clone not pulling latest version HOT 6
- Update helm image? HOT 2
- Container startup only works with bind mount; `cp: can't create directory '/var/www/app/storage/app': Permission denied` HOT 5
- Http links requested when visiting a https page HOT 1
- Helm Chart commonLabels vs podLabels
- Database Availability Race Condition during Intialisation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfiles.