monicahq / docker

docker image of Monica

Home Page:https://hub.docker.com/_/monica/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reminders not being sent out

Impressivenerd opened this issue · comments

Hi - I seem to be having some trouble getting reminders emailed to me.

I have Monica running in a docker container, using the following docker run command (some portions redacted for privacy)

docker run -d --name monica \
   -e DB_HOST=<REDACTED> \
   -e MAIL_MAILER=smtp \
   -e MAIL_HOST=<REDACTED> \
   -e MAIL_PORT=587 \
   -e MAIL_ENCRYPTION=tls \
   -e MAIL_USERNAME=<REDACTED> \
   -e MAIL_PASSWORD=<REDACTED> \
   -e MAIL_FROM_ADDRESS=<REDACTED> \
   -e MAIL_FROM_NAME=<REDACTED> \
   -e REQUIRES_SUBSCRIPTION=false \
   -p 7777:80 \
   --restart unless-stopped \
   monica

Emails appear to be working, both by using the artisan test email command (php artisan monica:test-email) as well as by testing using the "Forgot Password" functionality.

I am trying to get one time / weekly reminders working, but nothing comes to my inbox in these instances. Although, in the app I do see the next run date incrementing as expected - just no emails are being sent out.

The version I am currently running is Version: 2.19.1.

Any assistance is appreciated.

I believe cron was removed from the base image. I think the minimal option is now the supervisor setup.

Hello
For the reminders to be sent, you need to setup a scheduled run task.

You can either

  • run cron (which indeed is not run automatically in the based image), using another container. See example here. This is the best "docker-like" solution.
  • use supervisor, which run multiple tasks in the same container, see example here.

For anyone else's future reference, I utilized the supervisor method as @asbiin referred to in his answer, and was able to get Monica to properly send out a one-time reminder. Of course, I had to switch from using a single docker run command to using docker-compose, but that doesn't bother me in my case.

Thank you @bbrendon and @asbiin for your responses!