Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with email on docker installation #3584

Open
TaylorJadin opened this issue Apr 14, 2023 · 4 comments
Open

Issues with email on docker installation #3584

TaylorJadin opened this issue Apr 14, 2023 · 4 comments

Comments

@TaylorJadin
Copy link

I've been playing around with a docker based installation of Manifold, going off the instructions here:
https://manifoldscholar.github.io/manifold-docusaurus/docs/administering/installation#docker-install

I'm running into issues configuring email, though. I've tried using sendmail and SMTP, but whenever I try to use the "Send Test Email" button I get a "500 Error: API Internal Server Error" and no email is sent. Looking at the output of docker-compose logs -f I'm noticing this error that seems related:

api_rails_1      | F, [2023-04-14T16:20:23.025304 #35] FATAL -- : [0b8a81ab-1723-4f57-8d92-ce9865d853f9]   
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9] Premailer::Rails::CSSHelper::FileNotFound (File with URL "mail_styles.css" could not be loaded by any strategy.):
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9]   
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9] app/models/concerns/recoverable.rb:18:in `send_reset_password_email'
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9] app/models/concerns/recoverable.rb:14:in `generate_reset_token'
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9] app/controllers/api/v1/passwords_controller.rb:13:in `create'
api_rails_1      | [0b8a81ab-1723-4f57-8d92-ce9865d853f9] lib/middleware/omniauth_stack.rb:10:in `call'

At first, I thought this might be related to my nginx proxy setup, but I've tried it without that, and I'm still seeing the same error, so maybe I'm missing something else here in my setup.

@TaylorJadin
Copy link
Author

Its also just now occurring to me that this might have made more sense to put as an issue over at https://github.com/ManifoldScholar/manifold-docker-compose

So let me know if I should close this and file it over there!

@zdavis
Copy link
Member

zdavis commented Apr 14, 2023

Thanks for reporting this. I'll try to take a look at this over the weekend and see if I can sort it out.

@stevegiessler
Copy link

I ran into this very issue earlier today and was able to resolve it by exec-ing into the main rails container:

docker exec -it manifold-api_rails-1 bash

And once in there:

cd /opt/manifold/api/public
touch mail_styles.css

Then exit out of the container and restart the containers (not sure if that step is actually necessary).

Turns out it just wanted that stylesheet to be present, even if empty. You can see it was looking for that in the logs. Took me a bit to figure out exactly where to put that file...

Also, for me, the "Sendmail" option in the GUI did not work, despite my MTA being configured properly on the host VM. So I tried the SMTP option and sending mail finally worked from the Manifold test mail in the GUI. I am still having another issue with images in the mail message not displaying but that is because I am using a custom Nginx reverse proxy and I just need to work out how to get the static files to load. Anyway, I hope that helps some folks.

@TaylorJadin
Copy link
Author

@stevegiessler That did the trick for me, thanks!

In my experience this worked without needing to restart the containers:

docker exec manifold_api_rails_1 touch /opt/manifold/api/public/mail_styles.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants