Hey there, I have ghost currently running in Docker and I would like to configre it to use a custom SMTP host. I believe you can do this in the config file, however I’m wondering if you can do it through environment variables, and if so, how?
Yep, take a look at Configuration - Adapt your publication to suit your needs!
Do note that the variables have to be lowercase ![]()
Ah thanks! Is there anyway to use this with newsletters?
No. That’s covered in the FAQ Why do I have to set up Mailgun?
Ok, I had the same problem. I have hosted my website on a Docker container and I had to edit the config.production.json file to add my credentials. I knew there must be some options to use environment variables and I found it in the actual documentation itself. Here’s my docker-compose.yml file on how to set up environment variables. Check out the documentation for more. Configuration - Adapt your publication to suit your needs Look under the “Running Ghost with config env variables”
section.
I have found a very straight forward way to do it in Docker: How to add SMTP (mail) configuration? - #9 by kasir-barati
Please don’t bump every thread about Docker and SMTP with a link to your repo. Once is good! :)
