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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngninx & traefik as reverse proxies #201

Closed
MakiG0 opened this issue Oct 24, 2020 · 3 comments
Closed

ngninx & traefik as reverse proxies #201

MakiG0 opened this issue Oct 24, 2020 · 3 comments
Labels
setup issue possibly or definitely an issue with the user setup

Comments

@MakiG0
Copy link

MakiG0 commented Oct 24, 2020

Hey vabene1111,
first I would like to thank you for this great tool 馃憤 really good job!
i have not found another way to contact you. I hope it is okay that I have opened this request here.
My collegue and I have two setup questions:

  1. we both set up recipes only with traefik. We then discovered that recipes are imported without images. If we set the environment variable "gunicorn" to 1, it works again, but as you described, it is not recommended. Can you explain why?
  2. The second question is about the joint use of traefik and ngnix. We do not understand why two reverse proxies are used. Can you explain this?

many thanks in advance ;-)

@MakiG0 MakiG0 added the setup issue possibly or definitely an issue with the user setup label Oct 24, 2020
@vabene1111
Copy link
Collaborator

hey makiGo, github is the perfect way to communicate for me as other who have the same questions can see the answers as well.

  1. GUNICORN_MEDIA makes it so that gunicorn (the WSGI server that actually is responsible for executing the python code) also handles the image processing. I personally do not 100% understand why this is bad but in general you could say that guniconr simply is not made to be the forward facing service and thus does not implement many of the performance and security functions that nginx does (there are many interesting posts on stackofverlow regarding this topic and also one from one of the gunicorn developers, maybe start reading here https://serverfault.com/questions/220046/why-is-setting-nginx-as-a-reverse-proxy-a-good-idea)

  2. traefik is "only" a reverse proxy, not a web server. Its also much easier (at least from my perspective where i want to write a tutorial and a mostly self contained setup) to provide instructions with nginx bundled. In the end you can do everything with just gunicorn and traefik but since nginx uses very little CPU time and memory i do not see a reason to remove the image from the stack (at least for the default implementation)

further explanaition can be found in the release notes of the 0.8.1 release https://github.com/vabene1111/recipes/releases/tag/0.8.1

If this answers your question please close this issue, if not please further specify what you want to know :)

@MakiG0
Copy link
Author

MakiG0 commented Oct 26, 2020

hey vabene1111,
sorry for late response. Thanks for your feedback.
So you can also run recipes with no safety concerns without ngnix and Gunicorn = 1? Is that correct?

@vabene1111
Copy link
Collaborator

i cant give you a guaranteed answer to this but as far as i understand it should be safe to run it that way (thats why i left the option in).

You might be susceptible to denial of service attacks but for a small personal setup this should not cause any problems.

just to be sure: I do NOT recommend you to run without a proper webserver! It should be fine but please consider setting up nginx, its not that hard and does not use much performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup issue possibly or definitely an issue with the user setup
Projects
None yet
Development

No branches or pull requests

2 participants