invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
420 stars 268 forks source link

Custom SMTP don't seem to work #459

Closed wrender closed 2 years ago

wrender commented 2 years ago

Setup information

Helm

Describe the bug When I try to apply custom environments in my values.yaml file they don't seem to take affect. I exec into the kubernetes invoiceninja pod, and cat the .env file, and I don't see the smtp settings in affect after. Am I missing something? Basically just trying to relay emails through an Office 365 account.

extraEnvVars:
  - name: MAIL_HOST
    value: "smtp.office365.com"
  - name: MAIL_PORT
    value: "587"
  - name: MAIL_USERNAME
    value: "wes@mydomain.com"
  - name: MAIL_PASSWORD
    value: "mystrongpassword"
  - name: MAIL_ENCRYPTION
    value: "TLS"
  - name: MAIL_FROM_ADDRESS
    value: "wes@mydomain.com"
  - name: MAIL_FROM_NAME
    value: "Wes"

Expected behavior I would expect the .env file in the pod to reflect the settings I put in extraEnvVars.

turbo124 commented 2 years ago

I'm not that familiar with the way Helm starts up, but i would try either or both of the following:

  1. add your environment variables to the root env file of the project / restart the containers (this should recache the .env variables)
  2. sh into the app container and run php artisan optimize
wrender commented 2 years ago

Oh. My apologies. It is now working. I just sent a test email. I guess the .env file in the kubernetes pod isn't what is being used by the app. I'm not sure where the helm chart is storing the smtp settings.